[resolved] Access exchange / context object from cMap

Four Stars

[resolved] Access exchange / context object from cMap

Hi Team,
I've come across a scenario where i have to access the context parameters in the cMap component. 
I've used bean class using the parameterised constructor to set the values in instance variable and the same i accessed from java static method. 
Is there any other way to access the same? The problem with this method i ESB container needs to be restarted completely to initialize these variables.
Jeeva

Accepted Solutions
Employee

Re: [resolved] Access exchange / context object from cMap

Hello Jeeva ,
You would need to set context variable as exchange property like a header before you pass to cMap . And in actual map in TDM , you would use GetMapProperty function and just give your context variable name. See attached screenshots.

All Replies
Employee

Re: [resolved] Access exchange / context object from cMap

Hello Jeeva ,
You would need to set context variable as exchange property like a header before you pass to cMap . And in actual map in TDM , you would use GetMapProperty function and just give your context variable name. See attached screenshots.
Four Stars

Re: [resolved] Access exchange / context object from cMap

Thank you so much for your reply. It works.