Apama 10.7.2 | Connecting Apama Applications to External Components | Correlator-Integrated Support for the Java Message Service (JMS) | Using the Java Message Service (JMS) | Mapping Apama events and JMS messages | Using expressions in mapping rules
 
Using expressions in mapping rules
Use this approach when sending or receiving JMS messages and you need to write a customized JUEL expression for a mapping rule.
In many cases, a mapping rule requires customization. For example, if you map an event field to a JMS Property field, then you need to specify which JMS property to use. In other cases, you may want to use a constant value in a mapping rule or to create a JUEL expression, for example to execute an XPath query on nested XML documents.
*To add an expression to a mapping rule
1. Drag a mapping line from the entry in the source tree to the target. If one side of the mapping rule requires a more specific expression, the Connection Participants dialog is displayed.
2. In the Connection Participants dialog's Type field, select an entry from the drop-down list.
3. In the next field enter the JMS Body type, the JMS Property name, a constant value, or a custom JUEL expression. As you enter this information, the expression that will be used in the mapping rule is displayed in the Expression Value field.
4. Click OK.
For a table of expressions for getting and setting values in JMS messages and recommended mappings to Apama event types, see JUEL mapping expressions reference for JMS.