A Variable is used to set or remove a variable on message. The Scope Variable is limited to the flow where it is set. When a message leaves the flow, the variable doesn’t carry to next flow or application.
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.
The Flow Variable can be accessed using syntax #[flowVars.Id] if the Id is the name of flow variable.
Flow Variable [Video]
The Session Variable is used to set or remove the 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.