2. VARIABLE
• Flow variable is use to set variable that can be used anywhere in a flow. Use
a variable transformer to set or remove a variable on the message. The scope of
this variable is limited to the flow where it is set; when the message leaves the
flow, the variable does not carry over to the next flow or application.
3. CONFIGURATION
• For adding variable, just drag variable
component from the mule platte to the flow.
It will look like as image. In this, there is one
component of variable and a logger which is
used to logging message. This is visual
configuration.
4. CONTD
• This is the xml view of variable
component. There are two main
properties:
• variableName – name of variable which
will used later in the flow.
• Value – value of variable which variable
will hold.
• XML view
<set-variable variableName="helloMule"
value="Hello mule, we love you."
doc:name="Variable"/>
6. DESCRIPTION
Property Description
Display Name Value which is to be shown in mule flow
Operation Set Variable : Select to set a new variable on your message (as shown
in example screenshot above).
Remove Variable : Select to delete an existing variable from your
message.
Name Specify the name for the variable that you are creating or identify the
name of the variable that you are removing. If you are removing
variables, this field accepts a wildcard "*" character.
Value This field displays only if you are setting a new variable. Specify the
value using either a string or a Mule expression.
MIME Encoding (Optional) Indicates the MIME encoding language. Only appears when
setting a variable.
MIME Type (Optional) Indicates the MIME type. Only appears when setting a
variable.
7. VARIABLES TYPE SUPPORTED BY MULE
• Mule supports following types of variable transformers
• Session variable
• Record variable
• Flow variable
• CORS variable (in new version of mule)
8. RECORD VARIABLE
• With batch processing comes the ability to set, remove, and reference variables
associated to individual records. Serialized and persisting only through the
Process phase, a record variable stores information at the record level, rather than
the flow or session level. For example, you can use recordVars to capture whether
or not a customer contact – as a record – already exists in a database.
9. SESSION VARIABLE
• It can be used to set or remove that is tied to a message for its entire lifecycle,
across multiple flows, applications and even servers.