Every trigger node (ex: Inject, Catch or Http In) injects a new message object with a unique id into the flow. This message object is passed through the nodes and nodes update this object with data for the upcoming nodes to use.
If you need to keep data through out the flow's run time you should use variables.
To add a new variable, just click the + sign at the top right corner of the bottom panel seen when the Variables tab is selected.
Currently there are six types of variables: String, Integer, Boolean, Double, Array and Object.
Every variable has a scope. Global scope can be seen by the main flow and all the subflows. Flow scope can only be seen by the sub flows or main flow.
Variables may be used as input or output values from the node properties panel at the right side of the Flow Designer.
There are 3 types of scope for variables. Global, Flow and a special variable scope for the Function node: local scope that can be reached from Function node's own property panel.
To set a variable value you can call .set function for the variable's scope object.