Configuring Sender Event Mappings
Each event mapping for a JMS message to be sent is configured by specifying the source Apama event type, and a set of mapping rules that populate the target JMS message from the fields of the source Apama event.
To configure an event mapping:
1. Ensure that the Apama event types you wish to use for mapping have been defined in an EPL file in your project.
2. If necessary, in the Project Explorer, double-click the project’s correlator-integrated messaging adapter for JMS instance. This opens the instance configuration in the Apama Studio adapter editor.
3. Select the JMS Connection.
4. In the correlator-integrated messaging adapter for JMS editor, select the Event Mappings tab.
5. On the adapter editor's Event Mappings tab, select the Sender Mapping Configuration tab.
6. On the Sender Mapping Configuration tab click the Add Event button (). This displays the Select Event dialog. 7. In the Event Type Selection dialog‘s Event Type Selection field, enter the name of the event. As you type, event types that match what you enter are shown in the Matching Items list.
8. In the Matching Items list, select the name of the event type you want to associate with the JMS message. The name of the EPL file that defines the selected event is displayed in the status area at the bottom of the dialog.
9. Click OK.
This updates the display in the adapter editor's Event Mappings tab to show a hierarchical view of the Apama event on the left (the mapping source) and a hierarchical view of the JMS message on the right (the mapping target).
10. Create a mapping rule as follows:
a. If necessary, click on the event to be mapped in the Event name column.
b. Click on the entity in the Event tree and drag a line to the entity in the Message tree.
For example, a simple mapping would be from a single
string field in an Apama event to the JMS message Body. More complex mappings might involve mapping an event field to a specific JMS property.For more information see
Mapping Apama events and JMS messages.
11. Specify the message's JMS destination in either of two ways:
Specify a constant value in the event type's mapping:
Specify a destination in an event field and map that field to the message:
Note destination is always specified as topic:name, queue:name, or jndi:name