Search code examples
muleesb

Session variables skipping multiple requests


I understand that session variables in Mule ESB can be shared between different flows of the same request, but... How can I make a variable visible to multiple requests? It is a variable, so it would change depending on the data the flow receive. Thanks in advance!


Solution

  • you can use the new mule 3.4 cache scope to store/cache objects, alternatively you can use the Mule Objectstore to save the session value as key and object. This can be in-memory or persistent

    <objectstore:retrieve key="mykey" defaultValue-ref="myvalue"/>