I'm basing some decisions in my jobs off the context group which I'm getting from contextStr. But when I create a parent/subjob arrangement and pass the context to the subjob, the contextStr does not change. It appears the context is being set, but the variable contextStr is not.
I have created a context with 2 context variables, Environment and testServer. I have 4 context groups, Dev, Test, QA, and Prod. The default is Dev. The context variables in each group are set to indicate the group (in this example).
The jobs for this test are simply a tPrejob triggering a tJava which contains the System.out.println statements. The tRunJob in the parent has the Transmit whole context box checked.
Here is my output when I select Test for the context (default is Dev):
Starting job ParentJob at 12:33 27/02/2013.
connecting to socket on port 3623
connected
In Parent Job.
Using Test context (contextStr)
Environment = Test
Server = testServer
In Child Job.
Using Dev context (contextStr)
Environment = Test
Server = testServer
disconnected
As you can see the parent is using the Test context and the context variables in the child show the correct context, but the contestStr in the child is not correct. It is showing the default context.
I am using Talend Enterprise Data Integration Team edition 5.1.1
Job ParentJob ended at 12:33 27/02/2013.
You can decide that child jobs don't have to know about environment context.(dev or prod for ex.) ChildJob just have to declare context value is going work with. But father job is the "boss" and just give only the value the child need and tell which environment is used.