Mule soft mel_day2
-
Upload
abhipokharna -
Category
Technology
-
view
125 -
download
0
Transcript of Mule soft mel_day2
Abhishek Jain
Use of MEL Access Object Level Properties Access Method Level Properties Operators Operators Evaluation Data Extraction Topic for next session Reference
-In the previous slide example, MEL is calling the inbound
property from the mule message for the value of “Host”
-All properties are stored in Map
-There are two ways to access them
-#[message.getInboundProperty(‘host’)]
-#[message.InboundProperties[‘host’]]
-In order to access Mule Registry, use below expression
-#[app.registry]
If payload is of type java objectthen properties can be accessed directly by calling the fieldname from payload.
For example, payload is of CustomerDetails object and want to access lastname then use the below expression
#[payload.lastName]
If payload is of type java objectthen methods can also be triggered using MEL
For example, payload is of CustomerDetails object and want to trigger getFirstName method then use below expressiono
#[payload.getFirstName()]
#[‘hello’ + ‘John’] => Hello John
Standard Comparison Operators:
==, !=, >, <, >=, =<
Contains – Similar to like Operator
Is- Checks the type of an object
Mainly used in Choice Router
#[xpath(‘expression’)] #[regex(‘expression’)]
List/Maps in MEL
www.mulesoft.com Mule in Action