Apama Documentation : 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 : Creating Apama event type definitions for EDA events
Creating Apama event type definitions for EDA events
To create an Apama event type definition for an EDA event
1. Ensure that you can access the XML Schema (.xsd) file that defines the EDA event type or types for which you want to create Apama (EPL) event type definitions.
2. In Software AG Designer's Project Explorer, right-click the eventdefinitions folder in the project in which you want to use EDA events and select New > Event Definition.
3. In the New Event Definition dialog, select EDA Event Type and click Next.
4. Accept the default containing folder or click Browse to specify the location of the EPL event type definition(s) to be generated. Click Next.
5. Click the Browse button to the right of the Schema Element/Type field to display the Type Chooser dialog, which allows selection of an XML Schema element that has the substitution group as eda(Namespace):Payload.
The drop-down arrow lets you change scope among Recent files, Local file system, Workspace, Remote URL, and XML Schema.
6. Select an element, click OK and then Finish.
One EPL (.mon) file is generated for each EDA namespace. Each .mon file contains event type definitions for all EDA event types defined in that namespace. The files are generated with file names in the following format:
payload_element_name_EDA.mon
If more than one .mon file is generated, file names end with *_n.mon. For example, EDA_test_1.mon, EDA_sample_2.mon and so on.
Generated EPL files include a root wrapper Apama event whose name is the name of the payload element appended by _EDA, for example, CableboxHealth_EDA. This root event is used for sending and receiving EDA events.
The root event contains a field for the payload element and a dictionary field for EDA headers. The name of the payload field corresponding to the payload element is the same as the name of the payload element. The type of the payload field is an event type that corresponds to the type of the payload element. The structure and name of the root event is governed by the conventions described in Rules that govern automatic conversion between of EDA events and Apama events.
The root event also contains the configure() action to populate the header dictionary with filterable properties and some standard EDA headers. For example:
*headers["$Event$Kind"] := "Event"; //Fixed value
*headers ["$Event$FormatVersion"] := "9.0"; //Fixed value
*headers ["$Event$Type"] is set to the type of the EDA event from which these Apama event definitions are generated, for example: "{http://namespaces.softwareag.com/EDA/WebM/Communication/Sms}SmsSent".
In the EPL context from which you sent the root event to a JMS topic for consumption by EDA, you must call the configure() action before you send the event.
Once you have EPL event type definitions for the EDA event types your application needs to use, you can set up the receiver and sender mapping configurations in a correlator-integrated adapter for JMS.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback