This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
mule_expressions [2014/04/11 03:27]
root [Expression Types (Evaluators)]
mule_expressions [2019/04/15 08:51] (current)
root [Expression Operators]
Line 107: Line 107:
 </​code> ​               ​ </​code> ​               ​
 += Variables =
 +* The Flow Variable is used to set or remove the variable tied to message in current flow. Variables set by flow variable transformer persist for the current flow and cannot cross the transport barrier.
 +The Flow Variable can be accessed in current flow, calling flows (sub flow/​private flow) and even their child flows.
 +* Session variable tied to current message for its entire lifecycle across multiple flows and even servers.
 +Variables set by the Session Variable transformer persist for the entire lifecycle regardless of transport barrier. The Session Variable can be accessed in current flow, calling/​child,​ flow within the entire project, and even JVM systems.
 +Session Variable can be accessed using syntax** #​[sessionVars.Id]** if the Id is the name of the Session Variable.
 +== Functional Testing == 
 +Mule test class that //extends FunctionalTestCase// ​
 +<code java>
 + @Test ​
 + public void setFlowVarTest(){
 + MuleEvent event;
 + Object payload = null;
 + event = getTestEvent(payload);​
 + event.setFlowVariable("​test",​ "​value"​);​
 + MuleEvent eventResult = runFlow("​cspace_interface2Flow1",​ event);
 + System.err.println "got response " + eventResult.getMessage().getPayload()
 + }
 == Get/Set Variables == == Get/Set Variables ==
 Setting and Modifying variables can be done via the "​Message Properties"​ transformer ​ Setting and Modifying variables can be done via the "​Message Properties"​ transformer ​
mule_expressions.txt · Last modified: 2019/04/15 08:51 by root
RSS - 200 © CrosswireDigitialMedia Ltd