You are here: Home » Saddle Message Layer » Mapping Variations

Message Layer: Mapping Variations

E-mail Print PDF

Saddle allows different variations for the message mapping that Mule does not provide out of the box:

 

Data merging

Messages coming from different data channels can be accessed by a mapping. This might be useful, if information coming from different data sources has to be accessed for creating the destination message.

 

Channel triggering

It is possible to request messages from a specific data channel. This might be helpful, if a message or a bunch of messages is needed, based on the content of messages coming from another data channel. That way, it is possible to dynamically pull e.g. the content of certain files from a directory, depending on filter criteria obtained from another message.

Messages can be dynamically requested if the corresponding data channel has been marked as triggered in the “create new mapping” dialog. The automatically created mapping class stub provides a method to request a message from a triggered data channel.

This method is called: requestMessage()

 

User-defined response generation

Saddle mappings allow to return a user defined message to a data channel during the mapping. That might be necessary for external source systems that expect a response to the message they have sent. If the receiving system does not provide a response, the response can be generated and sent from the mapping. For sending a user defined response to an inbound channel, the mapping has to have a return router defined. The mapping class stub contains a method to send back a response to an in-bound channel.

This method is called: sendAsyncResponse()

 

Multiple message generation

Multiple messages can be sent from within one mapping. This might be helpful, if an incoming message has to be split up into different destination messages. That way it is e.g. possible to generate different orders for different vendors from a message that describes a purchase list. The mapping class stub contains a method to send outbound messages from within the mapping.

This method is called:  dispatchMessage()

All constellations shown above can be freely combined.