Connecting Apama Applications to External Components > Using Message Services > Using Correlator-Integrated Messaging for JMS > Mapping Apama events and JMS messages > Using EDA events in Apama applications > Automatically mapping configurations for EDA events
Automatically mapping configurations for EDA events
With EPL event type definitions for the EDA events you want to use in your application, you can use Apama Studio to automatically create sender and receiver mapping configurations in a correlator-integrated adapter for JMS. To do this:
1. If you have not already done so, add a correlator-integrated messaging adapter for JMS to your project.
2. In the Project Explorer pane, in the project that uses EDA events, expand the Adapters folder and double-click the correlator-integrated adapter for JMS instance to open it in the JMS Connections editor.
3. In the editor, click the Event Mappings tab.
4. In the Sender Mapping Configuration tab, click the down-pointing carat to the right of the plus sign and select Add EDA Event.
The Event Type Selection dialog appears with *_EDA in the filter field and a list of the EPL event type definitions that correspond to EDA event types.
5. Select one or more event types for which you want to configure sender mappings and click OK.
For each selected event, Apama Studio generates three mappings from Apama EPL event type definitions to JMS messages that will publish EDA events:
*headers is mapped to JMS Properties .
*Convert to XML is mapped to JMS Body . Apama Studio automatically turns on Apply EDA rules for the Convert to XML node. This means that Apama Studio applies a defined set of conventions for mappings between EPL event types that represent EDA events and the JMS messages that publish and consume the EDA events. See About convention-based EDA mapping.
*Constant node item JNDI DESTINATION is mapped to Destination . The Destination is the JNDI name, which follows the convention of the EDA event. You should create a JMS topic and map it to the JNDI name according to EDA conventions before using Apama to send or receive an EDA event. For example:
6. Click the Receiver Mapping Configuration tab.
Apama Studio automatically specifies that the $Event$Type property of the JMS message should match the expected name of the EDA event. When the expression evaluates to true for the JMS property value of an incoming event it triggers the mapping of the incoming JMS message to an Apama EPL event type. Apama Studio also automatically generates two mappings from JMS messages that consume EDA events to Apama EPL event type definitions:
*JMS Properties to headers.
*JMS Body to the main text node in the event type definition. This mapping converts the EDA XML to Apama events according to the conventions of EDA mapping. For details, see About convention-based EDA mapping. For example:
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.