When used Poll scope not able to access sessionVars in mule

106 views Asked by At

I have one flow(A) with poll as source with transformation logic and storing result data in session variable. Whenever I tried to use session variable in another flow(B). Note : Flow(B) is not calling from flow A. I am not able to get the value out of it. Because of will not be able to access the session variable. Could you please let me know anyone why?

1

There are 1 answers

3
Naveen Raj On

Session Variable is not a storage for all the flows that you code in a single XML.

It is only for one single end to end thread.

In your case if the flow B is not called from Flow A then you will not get the session Variable.

Go through the documentation again : enter link description here

Use a session variable to set or remove a variable that is tied to a message for its entire lifecycle, across multiple flows, applications, and even servers.

From above it is explained that the session variable can be used accross multiple flow but you will have to note the word " Lifecycle "

This means that the session variable is accessible through out all the flows provided in the lifecycle of the thread