Discussion:
getParam from other AL
(too old to reply)
Andre Crespo
2017-08-22 20:30:44 UTC
Permalink
Raw Message
I have a AL that call several other ALs by main.startAL function. Is there any way to get a specific parameter before call one of these ALs?

The child AL have this parameter I need to get:

Output.getConnector().getParam("jdbcSource");

I can read this value after start the child AL but I need the value before to make some decisions.

Thanks.
Andre Crespo
Eddie Hartman
2017-08-23 19:25:59 UTC
Permalink
Raw Message
Post by Andre Crespo
I have a AL that call several other ALs by main.startAL function. Is there any way to get a specific parameter before call one of these ALs?
Output.getConnector().getParam("jdbcSource");
I can read this value after start the child AL but I need the value before to make some decisions.
Thanks.
Andre Crespo
You have a few choices, Andre. You could pass the parameter as an attribute in an Entry that you pass (the Initial Work Entry), or you could set up a TCB (TaskCallBlock - look in the TDI JavaDocs). This lets you set connector parameters for the AL you want to call. Then you pass the tcb in the startAL() function invocation.

-Eddie
Andre Crespo
2017-08-24 23:10:47 UTC
Permalink
Raw Message
You recommendation is valid if I want to read this parameter after startAL but I need before the run. I need to set a variable based on the value of this parameter.
Eddie Hartman
2017-08-25 09:39:50 UTC
Permalink
Raw Message
Post by Andre Crespo
You recommendation is valid if I want to read this parameter after startAL but I need before the run. I need to set a variable based on the value of this parameter.
Then you can read the Configuration object of the AL about to be called - i.e. the MetamergeConfig object describing the AL, its components and settings. This is not something I've done much, but I generally start in the debugger with the TDI JavaDocs open, trying different objects and methods and seeing what I get back :)

Yeah, yeah, I'm always pushing the AL debugger. It's how I've answered most of my own questions through the years though.
Franzw
2017-08-27 17:26:53 UTC
Permalink
Raw Message
Post by Eddie Hartman
Post by Andre Crespo
You recommendation is valid if I want to read this parameter after startAL but I need before the run. I need to set a variable based on the value of this parameter.
Then you can read the Configuration object of the AL about to be called - i.e. the MetamergeConfig object describing the AL, its components and settings. This is not something I've done much, but I generally start in the debugger with the TDI JavaDocs open, trying different objects and methods and seeing what I get back :)
Yeah, yeah, I'm always pushing the AL debugger. It's how I've answered most of my own questions through the years though.
The TDI debugger rocks - no reason not to push it :-)

Regards
Franz Wolfhagen

Loading...