<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: contextStr not passed to subjob? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368549#M131801</link>
    <description>the fact is that you can run different context between father &amp;amp; child (even if it's a "non-sense", but it could be). 
&lt;BR /&gt;Create a childJob and a father jog &amp;amp; left Default context. 
&lt;BR /&gt;Create 2 context variable (for ex. : firstname &amp;amp; lastname) in each of them. 
&lt;BR /&gt;in father job put some value (ex. firstname = david &amp;amp; lastname = bowie) 
&lt;BR /&gt;in childJob lest null value 
&lt;BR /&gt;write values of context variable &amp;amp; contextStr in childJob in console 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;System.out.println("contextStr : " + contextStr);&lt;BR /&gt;System.out.println("firstname : " + context.firstname);&lt;BR /&gt;System.out.println("lastname : " + context.lastname);&lt;/PRE&gt; 
&lt;BR /&gt;run childJob : 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job f28400 at 21:55 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3543&lt;BR /&gt; connected&lt;BR /&gt;contextStr : Default&lt;BR /&gt;firstname : null&lt;BR /&gt;lastname : null&lt;BR /&gt; disconnected&lt;BR /&gt;Job f28400 ended at 21:55 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt;run father Job ... same result 
&lt;BR /&gt;check "transmit whole context" 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job father_f28400 at 21:58 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3336&lt;BR /&gt; connected&lt;BR /&gt;contextStr : Default&lt;BR /&gt;firstname : david&lt;BR /&gt;lastname : bowie&lt;BR /&gt; disconnected&lt;BR /&gt;Job father_f28400 ended at 21:58 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt;Now add an new context environnment ; let's say "test" in ChilJob (@see screenshoot) 
&lt;BR /&gt;you can run childJob with 2 different environmentt (Default &amp;amp; test) 
&lt;BR /&gt;Run childJob with those 2 differents env. =&amp;gt; change the value of contextStr 
&lt;BR /&gt; 
&lt;PRE&gt; connecting to socket on port 3708&lt;BR /&gt; connected&lt;BR /&gt;contextStr : Default&lt;BR /&gt;firstname : null&lt;BR /&gt;lastname : null&lt;BR /&gt; disconnected&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;PRE&gt; connecting to socket on port 3888&lt;BR /&gt; connected&lt;BR /&gt;contextStr : test&lt;BR /&gt;firstname : null&lt;BR /&gt;lastname : null&lt;BR /&gt; disconnected&lt;/PRE&gt; 
&lt;BR /&gt;Back to father that still have only a Default context with values "david" "bowie". 
&lt;BR /&gt;But you can select the context for the childJob (Default or test ) in component View. 
&lt;BR /&gt;See what happen with and without "transmit whole context" 
&lt;BR /&gt;With transmition , overwrite the "null value" of childJob, without take the value of the child depending of the "context passed in component view" . (for now , always "null" result. 
&lt;BR /&gt;To check , give different value in child job for firstname &amp;amp; lastname : 
&lt;BR /&gt;Default : kirk hammet 
&lt;BR /&gt;test : nina hagen 
&lt;BR /&gt; 
&lt;BR /&gt;First run Child 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job f28400 at 22:21 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3718&lt;BR /&gt; connected&lt;BR /&gt;contextStr : Default&lt;BR /&gt;firstname : kirk&lt;BR /&gt;lastname : hammet&lt;BR /&gt; disconnected&lt;BR /&gt;Job f28400 ended at 22:21 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job f28400 at 22:22 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3829&lt;BR /&gt; connected&lt;BR /&gt;contextStr : test&lt;BR /&gt;firstname : nina&lt;BR /&gt;lastname : hagen&lt;BR /&gt; disconnected&lt;BR /&gt;Job f28400 ended at 22:22 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt;Again back to father &amp;amp; run with or without "transmit whole context " and with the 2 differents child context in component view. 
&lt;BR /&gt;with transmit .... 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job father_f28400 at 22:23 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3455&lt;BR /&gt; connected&lt;BR /&gt;contextStr : test&lt;BR /&gt;firstname : david&lt;BR /&gt;lastname : bowie&lt;BR /&gt; disconnected&lt;BR /&gt;Job father_f28400 ended at 22:23 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt;Even if you change the context in component view ... overwrite value 
&lt;BR /&gt;without ... 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job father_f28400 at 22:25 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3655&lt;BR /&gt; connected&lt;BR /&gt;contextStr : Default&lt;BR /&gt;firstname : kirk&lt;BR /&gt;lastname : hammet&lt;BR /&gt; disconnected&lt;BR /&gt;Job father_f28400 ended at 22:25 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job father_f28400 at 22:25 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3791&lt;BR /&gt; connected&lt;BR /&gt;contextStr : test&lt;BR /&gt;firstname : nina&lt;BR /&gt;lastname : hagen&lt;BR /&gt; disconnected&lt;BR /&gt;Job father_f28400 ended at 22:25 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt;.. depending which context is passed ! 
&lt;BR /&gt;And now for the fun , add a second context environment for the father ... and run all the different possibilities ! 
&lt;BR /&gt;hope you see differences now 
&lt;BR /&gt;regards 
&lt;BR /&gt;laurent 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDta.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155132i18562359FD154132/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDta.png" alt="0683p000009MDta.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDhK.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137957i503357826081ADA5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDhK.png" alt="0683p000009MDhK.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDy6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147694i6C0F815D1F306888/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDy6.png" alt="0683p000009MDy6.png" /&gt;&lt;/span&gt;</description>
    <pubDate>Mon, 11 Mar 2013 21:33:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-03-11T21:33:22Z</dc:date>
    <item>
      <title>contextStr not passed to subjob?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368544#M131796</link>
      <description>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. 
&lt;BR /&gt;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). 
&lt;BR /&gt;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. 
&lt;BR /&gt;Here is my output when I select Test for the context (default is Dev): 
&lt;BR /&gt;Starting job ParentJob at 12:33 27/02/2013. 
&lt;BR /&gt; connecting to socket on port 3623 
&lt;BR /&gt; connected 
&lt;BR /&gt;In Parent Job. 
&lt;BR /&gt; Using Test context (contextStr) 
&lt;BR /&gt; Environment = Test 
&lt;BR /&gt; Server = testServer 
&lt;BR /&gt;In Child Job. 
&lt;BR /&gt; Using Dev context (contextStr) 
&lt;BR /&gt; Environment = Test 
&lt;BR /&gt; Server = testServer 
&lt;BR /&gt; disconnected 
&lt;BR /&gt;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. 
&lt;BR /&gt;I am using Talend Enterprise Data Integration Team edition 5.1.1 
&lt;BR /&gt;Job ParentJob ended at 12:33 27/02/2013.</description>
      <pubDate>Wed, 27 Feb 2013 17:37:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368544#M131796</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-02-27T17:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: contextStr not passed to subjob?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368545#M131797</link>
      <description>hi, 
&lt;BR /&gt;verify that you've got select the correct context (environment) in you trunJob Component. 
&lt;BR /&gt;I use test &amp;amp; dev context env. for the example. 
&lt;BR /&gt;depend on which context I pass to the child job, I've got different "answer". 
&lt;BR /&gt;hope it helps. 
&lt;BR /&gt;regards 
&lt;BR /&gt;laurent 
&lt;BR /&gt;... and be sure it's not a waste of time by using Talend Forum ... community &amp;amp; talend team are doing a real great job 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;The contextStr is not a documented "global var " and few of us use it, I guess. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDs3.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135499iAB4723B79849ED06/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDs3.jpg" alt="0683p000009MDs3.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 11 Mar 2013 14:16:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368545#M131797</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-11T14:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: contextStr not passed to subjob?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368546#M131798</link>
      <description>I'm not sure what you are doing. It looks like you are setting the Context dropdown in the tRunJob component. Yes, that works, but that's not what we need.
&lt;BR /&gt;We need the context of the parent (the job holding the tRunJob) to be sent to the subjob. The context of the parent is dynamic, only being set at run time. Our context variables are being sent down to the subjob based on this dynamic context. But the Talend global? variable contextStr is not.
&lt;BR /&gt;Parent
&lt;BR /&gt; context at run time = dev
&lt;BR /&gt; contextStr = 'dev'
&lt;BR /&gt; Context field on tRunJob = dev
&lt;BR /&gt;Child
&lt;BR /&gt; context at run time = dev
&lt;BR /&gt; contextStr = 'dev'
&lt;BR /&gt;Different run:
&lt;BR /&gt;Parent
&lt;BR /&gt; context at run time = test
&lt;BR /&gt; contextStr = 'test'
&lt;BR /&gt; Context field on tRunJob = dev
&lt;BR /&gt;Child
&lt;BR /&gt; context at run time = test
&lt;BR /&gt; contextStr = 'dev' &amp;lt;------</description>
      <pubDate>Mon, 11 Mar 2013 14:29:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368546#M131798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-11T14:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: contextStr not passed to subjob?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368547#M131799</link>
      <description>here's the way Talend manage the contextStr : 
&lt;BR /&gt; 
&lt;PRE&gt;// call job/subjob with an existing context, like:&lt;BR /&gt;			// --context=production. if without this parameter, there will use&lt;BR /&gt;			// the default context instead.&lt;BR /&gt;			java.io.InputStream inContext = contextPere.class.getClassLoader()&lt;BR /&gt;					.getResourceAsStream(&lt;BR /&gt;							"itf_sap/contextpere_0_1/contexts/" + contextStr&lt;BR /&gt;									+ ".properties");&lt;BR /&gt;			if (isDefaultContext &amp;amp;&amp;amp; inContext == null) {&lt;BR /&gt;			} else {&lt;BR /&gt;				if (inContext != null) {&lt;BR /&gt;					// defaultProps is in order to keep the original context&lt;BR /&gt;					// value&lt;BR /&gt;					defaultProps.load(inContext);&lt;BR /&gt;					inContext.close();&lt;BR /&gt;					context = new ContextProperties(defaultProps);&lt;BR /&gt;				} else {&lt;BR /&gt;					// print info and job continue to run, for case:&lt;BR /&gt;					// context_param is not empty.&lt;BR /&gt;					System.err.println("Could not find the context "&lt;BR /&gt;							+ contextStr);&lt;BR /&gt;				}&lt;BR /&gt;				if (!context_param.isEmpty()) {&lt;BR /&gt;					context.putAll(context_param);&lt;BR /&gt;				}&lt;/PRE&gt; 
&lt;BR /&gt;but never mind. 
&lt;BR /&gt;If you run job from Studio, child job use the context specify in the "box" or default if not. 
&lt;BR /&gt;if you export job, you can tell wich context env to use (@screenshoot) 
&lt;BR /&gt;if you're using export via TAC you can also 'force' father&amp;amp;child to use the same context param. 
&lt;BR /&gt;But the contextStr is "just a flag" to tell which value in context group to use &amp;amp; of course father and child have to use the same env. 
&lt;BR /&gt; 
&lt;BR /&gt;regards 
&lt;BR /&gt;laurent 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDqn.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128451i22BE4C65D2F24CD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDqn.jpg" alt="0683p000009MDqn.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 11 Mar 2013 15:37:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368547#M131799</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-11T15:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: contextStr not passed to subjob?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368548#M131800</link>
      <description>Not completely true. 
&lt;BR /&gt; 
&lt;BR /&gt;If I'm in the Studio and the checkbox "Transmit whole context" is checked on the tRunJob, the subjob will use the context of the parent (job holding the tRunJob) regardless of what is selected in the Context field of tRunJob. The listing in my first post show this. 
&lt;BR /&gt;I don't understand your last comment. Is contextStr an environment variable? It has no relationship to the context used by the child job. In my tests, when the "Transmit whole context" is checked, the child job uses the parent context. The contextStr in the child job does not match the context actually being used. I think that is a bug. If the job is using context 'A', contextStr for that job should be 'A'.</description>
      <pubDate>Mon, 11 Mar 2013 16:23:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368548#M131800</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-11T16:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: contextStr not passed to subjob?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368549#M131801</link>
      <description>the fact is that you can run different context between father &amp;amp; child (even if it's a "non-sense", but it could be). 
&lt;BR /&gt;Create a childJob and a father jog &amp;amp; left Default context. 
&lt;BR /&gt;Create 2 context variable (for ex. : firstname &amp;amp; lastname) in each of them. 
&lt;BR /&gt;in father job put some value (ex. firstname = david &amp;amp; lastname = bowie) 
&lt;BR /&gt;in childJob lest null value 
&lt;BR /&gt;write values of context variable &amp;amp; contextStr in childJob in console 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;System.out.println("contextStr : " + contextStr);&lt;BR /&gt;System.out.println("firstname : " + context.firstname);&lt;BR /&gt;System.out.println("lastname : " + context.lastname);&lt;/PRE&gt; 
&lt;BR /&gt;run childJob : 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job f28400 at 21:55 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3543&lt;BR /&gt; connected&lt;BR /&gt;contextStr : Default&lt;BR /&gt;firstname : null&lt;BR /&gt;lastname : null&lt;BR /&gt; disconnected&lt;BR /&gt;Job f28400 ended at 21:55 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt;run father Job ... same result 
&lt;BR /&gt;check "transmit whole context" 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job father_f28400 at 21:58 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3336&lt;BR /&gt; connected&lt;BR /&gt;contextStr : Default&lt;BR /&gt;firstname : david&lt;BR /&gt;lastname : bowie&lt;BR /&gt; disconnected&lt;BR /&gt;Job father_f28400 ended at 21:58 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt;Now add an new context environnment ; let's say "test" in ChilJob (@see screenshoot) 
&lt;BR /&gt;you can run childJob with 2 different environmentt (Default &amp;amp; test) 
&lt;BR /&gt;Run childJob with those 2 differents env. =&amp;gt; change the value of contextStr 
&lt;BR /&gt; 
&lt;PRE&gt; connecting to socket on port 3708&lt;BR /&gt; connected&lt;BR /&gt;contextStr : Default&lt;BR /&gt;firstname : null&lt;BR /&gt;lastname : null&lt;BR /&gt; disconnected&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;PRE&gt; connecting to socket on port 3888&lt;BR /&gt; connected&lt;BR /&gt;contextStr : test&lt;BR /&gt;firstname : null&lt;BR /&gt;lastname : null&lt;BR /&gt; disconnected&lt;/PRE&gt; 
&lt;BR /&gt;Back to father that still have only a Default context with values "david" "bowie". 
&lt;BR /&gt;But you can select the context for the childJob (Default or test ) in component View. 
&lt;BR /&gt;See what happen with and without "transmit whole context" 
&lt;BR /&gt;With transmition , overwrite the "null value" of childJob, without take the value of the child depending of the "context passed in component view" . (for now , always "null" result. 
&lt;BR /&gt;To check , give different value in child job for firstname &amp;amp; lastname : 
&lt;BR /&gt;Default : kirk hammet 
&lt;BR /&gt;test : nina hagen 
&lt;BR /&gt; 
&lt;BR /&gt;First run Child 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job f28400 at 22:21 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3718&lt;BR /&gt; connected&lt;BR /&gt;contextStr : Default&lt;BR /&gt;firstname : kirk&lt;BR /&gt;lastname : hammet&lt;BR /&gt; disconnected&lt;BR /&gt;Job f28400 ended at 22:21 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job f28400 at 22:22 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3829&lt;BR /&gt; connected&lt;BR /&gt;contextStr : test&lt;BR /&gt;firstname : nina&lt;BR /&gt;lastname : hagen&lt;BR /&gt; disconnected&lt;BR /&gt;Job f28400 ended at 22:22 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt;Again back to father &amp;amp; run with or without "transmit whole context " and with the 2 differents child context in component view. 
&lt;BR /&gt;with transmit .... 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job father_f28400 at 22:23 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3455&lt;BR /&gt; connected&lt;BR /&gt;contextStr : test&lt;BR /&gt;firstname : david&lt;BR /&gt;lastname : bowie&lt;BR /&gt; disconnected&lt;BR /&gt;Job father_f28400 ended at 22:23 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt;Even if you change the context in component view ... overwrite value 
&lt;BR /&gt;without ... 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job father_f28400 at 22:25 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3655&lt;BR /&gt; connected&lt;BR /&gt;contextStr : Default&lt;BR /&gt;firstname : kirk&lt;BR /&gt;lastname : hammet&lt;BR /&gt; disconnected&lt;BR /&gt;Job father_f28400 ended at 22:25 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job father_f28400 at 22:25 11/03/2013.&lt;BR /&gt;&lt;BR /&gt; connecting to socket on port 3791&lt;BR /&gt; connected&lt;BR /&gt;contextStr : test&lt;BR /&gt;firstname : nina&lt;BR /&gt;lastname : hagen&lt;BR /&gt; disconnected&lt;BR /&gt;Job father_f28400 ended at 22:25 11/03/2013. &lt;/PRE&gt; 
&lt;BR /&gt;.. depending which context is passed ! 
&lt;BR /&gt;And now for the fun , add a second context environment for the father ... and run all the different possibilities ! 
&lt;BR /&gt;hope you see differences now 
&lt;BR /&gt;regards 
&lt;BR /&gt;laurent 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDta.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155132i18562359FD154132/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDta.png" alt="0683p000009MDta.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDhK.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137957i503357826081ADA5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDhK.png" alt="0683p000009MDhK.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDy6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147694i6C0F815D1F306888/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDy6.png" alt="0683p000009MDy6.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 11 Mar 2013 21:33:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368549#M131801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-11T21:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: contextStr not passed to subjob?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368550#M131802</link>
      <description>@kzone, thank you for your detailed post. But it misses the point. In your 8th code widow you show a father with one context environment (Default) and context variables first_name = David, last_name = Bowie. 
&lt;BR /&gt;But the contextStr in the child says test which is NOT the father context which was supposed be transmitted down to the child. 
&lt;BR /&gt;Similarly, the context of David and Bowie in the child is not the test context of the child, even though the contextStr says it is. 
&lt;BR /&gt;In short, the contextStr value does not indicate the context variables the child is actually using. In your example in code window 8, the child is using the Default context values from the father job, but is stating, through the contextStr, it is using context test. 
&lt;BR /&gt;There is a problem in that the child can contain context variables not found in the father. What should the system to then? There's nothing to transmit down. I guess the child should default to whatever context was specified by the tRunJob component. 
&lt;BR /&gt;Never the less, the father job is the main job. This is the one where a context environment is defined at run time. Are we running in Dev, Test, QA, or Production? It's more important to know what runtime context was defined and being used for the whole job than to worry about the static default child context. I thought contextStr should show the context being used. Instead it shows the default or preset context of the current job. There is no indicator that shows the context of a job is being overwritten by a parent job. 
&lt;BR /&gt;I solved my problem by creating my own context variable called environment, transmitting it down to the child, and ignoring contextStr.</description>
      <pubDate>Tue, 12 Mar 2013 13:53:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368550#M131802</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-12T13:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: contextStr not passed to subjob?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368551#M131803</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;But the contextStr in the child says test which is NOT the father context which was supposed be transmitted down to the child&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;That's the point. 
&lt;BR /&gt;I think there is a good reason why "Talend doesn't documented" this variable. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; It's not the way we've to manage context between father/child. 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;There is no indicator that shows the context of a job is being overwritten by a parent job.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;the checked box option "transmit whole context" is "the indicator". 
&lt;BR /&gt;I use to left child job context value with null value (if it's possible) to "be sure" that father is the only one which have the "knownledge" about manage context (load value from db or file &amp;amp; pass values that child have to work with). 
&lt;BR /&gt;You can decide that child jobs don't have to know about environment context.(dev or prod for ex.) 
&lt;BR /&gt;ChildJob just have to declare context value is going work with. 
&lt;BR /&gt;But father job is the "boss" and just give only the value the child need and tell which environment is used. 
&lt;BR /&gt;run father in DEV context env. 
&lt;BR /&gt; 
&lt;PRE&gt; connecting to socket on port 3946&lt;BR /&gt; connected&lt;BR /&gt;localhost&lt;BR /&gt; disconnected&lt;/PRE&gt; 
&lt;BR /&gt;run father in PROD context env. 
&lt;BR /&gt; 
&lt;PRE&gt; connecting to socket on port 4064&lt;BR /&gt; connected&lt;BR /&gt;funny.bunny.com&lt;BR /&gt; disconnected&lt;/PRE&gt; 
&lt;BR /&gt;happy you find a workaround, even if it's seems a little "tricky". 
&lt;BR /&gt;regards 
&lt;BR /&gt;laurent 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDrf.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137834i024D71297EC29167/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDrf.png" alt="0683p000009MDrf.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDt1.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127797iAD30AC9D3B12B9B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDt1.png" alt="0683p000009MDt1.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDo6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136975i53CCF5BEDA6DE26F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDo6.png" alt="0683p000009MDo6.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 12 Mar 2013 16:57:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368551#M131803</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-12T16:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: contextStr not passed to subjob?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368552#M131804</link>
      <description>By indicator I meant something in the child job so it would know what it's running. As I stated in my original post, we have logic in our child jobs that depend on what context the parent job is running. In our design there is only one set of context variables (apparently duplicated in each child). But the context environment or group or whatever it's called that sets the group is selected at run time. I expected some built in context string or something to tell the child what the runtime context was. 
&lt;BR /&gt;I'm not sure how we found the contextStr variable, but it makes sense why it's not more prominent. I was assuming (erroneously) that when a context 'set' was set at runtime, it would apply to all subjobs of the job that was kicked off. It seems silly to run the parent in 'production' and the child in 'development'. But I now see that a child may not even have the same context variables. I also thought the child would inherit the context variables of the parent. 
&lt;BR /&gt;I see the preferred method of keeping the child in sync with the father is to explicitly transmit the context down, including the context name it that is needed. 
&lt;BR /&gt;Thanks for your help and insight.</description>
      <pubDate>Tue, 12 Mar 2013 18:26:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368552#M131804</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-12T18:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: contextStr not passed to subjob?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368553#M131805</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;I was assuming (erroneously) that when a context 'set' was set at runtime, it would apply to all subjobs of the job that was kicked off&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;you got it 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; (@screenshot) 
&lt;BR /&gt;regards 
&lt;BR /&gt;laurent 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDry.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140384iC96FD33E5EF9DD36/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDry.png" alt="0683p000009MDry.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 12 Mar 2013 20:38:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368553#M131805</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-12T20:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: contextStr not passed to subjob?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368554#M131806</link>
      <description>You can decide that child jobs don't have to know about environment context.(dev or prod for ex.)&lt;BR /&gt;ChildJob just have to declare context value is going work with.&lt;BR /&gt;But father job is the "boss" and just give only the value the child need and tell which environment is used.</description>
      <pubDate>Sat, 30 Mar 2013 13:02:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/contextStr-not-passed-to-subjob/m-p/2368554#M131806</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-03-30T13:02:52Z</dc:date>
    </item>
  </channel>
</rss>

