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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Loko
Creator II
Creator II

Context not passed from route to job

Hello
I use a same repository context group in my route and the job it calls.
The problem is the value of the context in the route are never passed to the job, for instance, in my cTalendJob basic settings :
0683p000009MCbF.png
I checked with System.out.print that context.SoapMessage  contains something in my route before calling the job, but in the job it is always empty.
NB : it works in the 2nd line with constant value "toto"
The Talend component help only shows constants passed to the job. How can we pass variable contexts ?
Thank you
Loko
Labels (3)
4 Replies
Anonymous
Not applicable

Hi,
You can use header:
1-In the route use a cSetHeader to assign you context variable to a header field.
0683p000009MCZK.png
2-Then call you job with a cTalendJob component.
0683p000009MCbK.png
3-Then use the header field in your job.
0683p000009MCbP.png
Eric
Loko
Creator II
Creator II
Author

OK thank you Eric for this workaround.
But in this case, I'm still wondering when thoses Context Param between Route and job are supposed to be used and when they work.
Loko
Anonymous
Not applicable

The context param you see in cTalendJob components are the contexts of your job. Not the ones of your route.
Loko
Creator II
Creator II
Author

So Context param can only accept static values ? If so, they're pretty useless, I guess.
The cTalendJob component (not the job itself) is on the route level, thus I think it should know the route contexts and use them as value for the Context Params to the job.