Deploying and Managing Apama Applications > Correlator-Integrated JMS Messaging > Getting started - creating an application with simple JMS messaging > Configuring Sender Event Mappings
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 JMS Correlator-Integrated Adapter instance. This opens the instance configuration in the Apama Studio adapter editor.
3. Select the JMS Connection.
4. In the JMS Correlator-Integrated Adapter 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:
For more information on specifying a constant value, see Using expressions in mapping rules.
*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
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.