Apama Documentation : Connecting Apama Applications to External Components : Using Message Services : Using Correlator-Integrated Messaging for JMS : Mapping Apama events and JMS messages : Convention-based XML mapping : 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.
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.
Apply EDA rules This 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.
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 the JMS Body.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback