mule soft mel_day2

12
Abhishek Jain

Upload: abhipokharna

Post on 13-Apr-2017

124 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Mule soft mel_day2

Abhishek Jain

Page 2: Mule soft mel_day2

Use of MEL Access Object Level Properties Access Method Level Properties Operators Operators Evaluation Data Extraction Topic for next session Reference

Page 3: Mule soft mel_day2
Page 4: Mule soft mel_day2

-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]

Page 5: Mule soft mel_day2

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]

Page 6: Mule soft mel_day2

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()]

Page 7: Mule soft mel_day2

#[‘hello’ + ‘John’] => Hello John

Page 8: Mule soft mel_day2

Standard Comparison Operators:

==, !=, >, <, >=, =<

Contains – Similar to like Operator

Is- Checks the type of an object

Mainly used in Choice Router

Page 9: Mule soft mel_day2

#[xpath(‘expression’)] #[regex(‘expression’)]

Page 10: Mule soft mel_day2

List/Maps in MEL

Page 11: Mule soft mel_day2

www.mulesoft.com Mule in Action

Page 12: Mule soft mel_day2