2. • Mule Expression Language (MEL) can be used
to evaluate many kinds of expressions,
including constants, simple operands,
operations with multiple values, or method
calls on objects.
• It can be used to perform regex or XPath3
functions.
Mule Expression Language (MEL)
3. • Use MEL expressions in combination with
other things such
as operands and operators to dynamically
return a value.
• Mule evaluates the expression at runtime, and
the message processor within which the MEL
expression resides uses the result to act upon
the message payload, properties or variables.
Mule Expression Language (MEL)
4. • MEL Expression :
– In Mule, an expression is a string, enclosed with [ ]
– At runtime, Mule uses MEL (as the default expression
evaluator) to determine the value of the expression.
– Mule supports other types of expressions as well
(which must also be enclosed in [ ] ), they are used to
evaluate your expression if it can’t be recognized as
MEL.
– MEL expressions follow a Java-like syntax.
– MEL is an expression language, not a programming
language.
– an expression in Mule:
• Always resolves to a single value.
• Cannot return type void
Mule Expression Language (MEL)
5. • Context Objects, Variables, and Fields :
– The term Context Object forms the first part of the simplest form of a
MEL expression
– the second part is the Field.
– Use a Variable in a MEL expression to access information contained
within a Flow Variable or Session Variable on your Mule message.
– Itself a top-level identifier in MEL, a variable does not require that you
define a context object in an expression
Mule Expression Language (MEL)