Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MEL Details Session 3

Abhi
June 30, 2015

MEL Details Session 3

MEL Details Session 3

Abhi

June 30, 2015
Tweet

More Decks by Abhi

Other Decks in Technology

Transcript

  1.  List and Maps  MEL Benefits  Different Ways

    of using MEL  Topic for next session  Reference
  2. A Simple Map can be created using below MEL expression

    example: [‘firstname’: ‘Abhi’, ‘lastname’:’jain’] The above example will create a map having two properties (firstname, lastname) with the values as (Abhi, jain) respectively On the same way arrays (Collection of Maps) can also be created [ [‘firstname’: ‘Abhi’, ‘lastname’:’jain’] [‘firstname’: ‘Montu’, ‘lastname’:’jain’] [‘firstname’: ‘John’, ‘lastname’:’ anderson’] ]
  3. -An Expression language which provides a consistent and standardized way

    to developers -Can be used easily with mule message, inbound/outbound properties, Variables -Easy to use -Works within message processors to decide the message routes -Used for extracting the information -No need to remember large syntaxes -
  4. MEL expression can be used for extracting the data and

    then decide the next course of action i.e. these can be pretty much used inside choice routers for directing the messages to different routes Small example: <choice> <when expression="#[payload.getFlightName() == ‘Delta']"> <flow-ref name==“DeltaAirLinesProcess" /> </when> <when expression="#[payload.getFlightName() == ‘United’']"> <flow-ref name==“UnitedAirLinesProcess" /> </when> </choice>
  5. MEL Can be used for extracting the values from payload,

    properties or context. For example You have several flow variables which are set (like to, cc, from, body) for sending email message. You can extract all the info and set it while working with one processor <smtp:outbound-endpoint from="#[flowVars.from]" to="#[flowVars.to]" subject="#[payload.subjectLine]" responseTimeout="10000" doc:name="SMTP"/>