Apama 10.3 | Apama Documentation | 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 convention-based XML mapping with JMS messages | Using convention-based XML mapping when sending/generating messages
Using convention-based XML mapping when sending/generating messages
* To map an Apama event to a JMS message using the convention-based approach
1. Create an Apama event type with fields that correspond in type and order to the structure of the XML document. To use convention-based XML mapping, the event type representing the XML document must be nested inside a parent event type, so ensure that such a parent event type has been created. Typically, the parent event type might have two fields, a string field representing the JMS destination, and an event field representing the root of the XML document.
2. In the adapter editor's Event Mappings tab, click the Add Event button () to add a mapping for the desired parent event type (that is, the event type that contains the event field that represents the XML root element).
3. In the adapter editor's Event Mappings tab, right-click the Apama event that represents the root node of the XML document and select Add Computed Node to display the Add Computed Node dialog.
4. In the Add Computed Node dialog's Select Method field, select Convert to XML from the drop-down list. The dialog is updated to show more information.
You can specify a namespace and namespace prefix for the generated XML document if desired, or else leave them blank. By default, the Include empty fields option is enabled. This specifies that empty XML nodes will be generated when empty EPL string fields are encountered within an Apama event. This option does not affect empty strings within a sequence of EPL strings. If you clear the check box to disable the option, empty XML nodes will not be generated.
The Apply EDA rules option specifies that an event is converted to XML which corresponds to an EDA event. This option should only be used with events generated from EDA event schema. See Using EDA events in Apama applications for more information.
Note: Software AG's Event-Driven Architecture (EDA) is deprecated. Support for EDA events will be removed in a future release. It is recommended that your Apama applications use digital event types instead, as provided by Software AG Digital Event Services. For further information, see The Digital Event Services Transport Connectivity Plug-in.
5. Click OK.
In the mapping tree, an entry of type Convert To XML is added to the selected event node.
6. Drag a mapping line from the Convert To XML entry to the desired node in the XML message, for example, to JMS Body.

Copyright © 2013-2018 | 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.