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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

retrieve context variables from cbean

From cbean, How do i retrieve context variables that i configured for route?

Labels (1)
  • Other

5 Replies
Anonymous
Not applicable
Author

Hi
Anybody knows how to do this?
Anonymous
Not applicable
Author

Hi,
Sorry for the delay, which version do you use? After the Talend upgrade, there is a new component called -cBeanRegister in Talend 5.2 and you can set the "Specify Arguments"in it to retrieve context variables directly. If you have the lower version, you need use cSetHeader and cBean.
See pics

Best regards
Sabrina
Anonymous
Not applicable
Author

Thanks for your answer!
I use 5.1, so I can use the cSetHeader + cBean method.
Is there a way to get information back from a bean into a route (header or context) ?
Best regards
Laci
Anonymous
Not applicable
Author

Hello Laci,
Context variables are intended for configuration purposes and not to dynamically pass data somewhere else, so there are no many means to set context values them in the mediation route.
If you pass an Exchange variable into a bean (a processor), you have access to all information - to the current camel context, in and out messages. What else you need..
Have fun
Gabriel
Anonymous
Not applicable
Author

Hi Gabriel
thanks for your answer.
I tried to set a header property in my bean (theExchange.getIn().setHeader("testProperty", "testValue");
but I don't see that property in the following components.
How can I do this?
Or is there another way to do it?
Thanks
Laci