Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
cherishma
Contributor III
Contributor III

Talend ESB route design with CTalendjob

Hi All,

 

I have a problem whilst designing the routes.

 

Design : Route design for calling the APIs.

 

I use the component CTalendjob to call the child job for each request .

 

I have observed that the contexts variables are not being passed from the route contexts to the child job when deployed in TAC , but works perfect from my local server during development.

 

Regards,

Cherishma

Labels (2)
7 Replies
Anonymous
Not applicable

How do you have your cTalendJob configured? Also, how are your context variables supplied to the Route?

cherishma
Contributor III
Contributor III
Author

Hi ,  

 

Please find the snapshot available for CtalendJOb configuration,

 

The route context is same as normal job context which have different environments Dev, Sit, prod etc.

0683p000009M5yY.jpg

 


upload.JPG
Anonymous
Not applicable

I have written a blog which might help you understand the Contexts, Context Variables and Context Groups a little better. I suspect that there is some confusion between Context and Context Variables going on here. If not, I have misunderstood your problem. My blog is here: https://www.talend.com/blog/2019/02/12/best-practices-for-using-context-variables-with-talend-part-1...

 

I *think* your problem is that your route is not passing the Context Variable values to the cTalendJob. Instead I suspect that it is simply telling the job which Context to run. If you want to pass actual values, I would suggest using the Context Param table shown in your screenshot. Select the context variable you want to pass to the child job and set it with a value or a context variable set within the route.

cherishma
Contributor III
Contributor III
Author

Hi ,

 

Thank you very much for your reply.

 

Yes you are right. The context variables are not being passed properly.

 

I would like to explain my scenario a bit more in detail so that you can suggest me best way to pass the context here.

 

My route job calls cTalendJob --  a child job(which is route child job)  which has Context group used as context.

 

I want to direct the child job to use appropriate context group as per the environment. After deploying in TAC - the context(Dev,sit,prod)  mentioned in TAC should be passed to the childjob.

 

This is not happening in my case.

 

Cheers!

Anonymous
Not applicable

I'm assuming that you mean Context when you say Context Group? A Context Group cannot be changed dynamically in this way. It is simply a group of Context Variables which can have multiple Contexts (environments). If you are wanting to change Context (environment) by the Context used to run the Route (set in TAC), then this should work as you have it configured. However, you will need to have the Context Variables preconfigured in your job correctly unless you are using another method to pass the actual values. 

cherishma
Contributor III
Contributor III
Author

Yes I have the Context Variables preconfigured in my job.

 

 So do you think if I choose use selected context in the cTalendJob and if i deploy the job TAC sit and use sit context in the TAC, it should pick the SIT contexts.

 

 

 

 

0683p000009M5tj.jpg

 

 

Cheers!

Anonymous
Not applicable

That should be how it works. But you will need a SIT Context in your child job as well as your Route, you will need the SIT Context Variable values specified at compile time and any child jobs within your cTalendJob will also need to be appropriately configured.