Reputation: 424
I have a requirement like first two messages need to be routed into one direction next three into another direction after some other root. I came to know that session variable scope and lifetime will be throughout the session. so i tried like
but getting concatenated value instead addition. initial count value is 0 and i'm running on mule 3.8.2.
Upvotes: 1
Views: 1880
Reputation: 4129
First initialize your session variable
<set-session-variable variableName="count" value="#[0]"/>
To increment it
<set-session-variable variableName="count" value="#[sessionVars.count + 1]"/>
Upvotes: 2