Apama 10.3.1 | Apama Documentation | Using Apama with Software AG Designer | Working with Projects | Adding resources to Apama projects | Creating new event definition files for EPL applications | Creating event definitions from XML files
 
Creating event definitions from XML files
You can create an event definition that is based on the structure of an XML document. The generated event definition is based on the following:
*All fields are treated as string.
*All prefixes are ignored, in other words, event definitions will be generated even if inner elements have different namespaces.
*Namespace attributes (attributes having an xmlns prefix) are ignored.
*All inner event names are prefixed with Element_.
*Generated event definitions will have an xmlTextNode field if the XML element contains a text value and also contains an attribute.
* To create an event definition from an XML file
1. In the Project Explorer view, right-click the eventdefinitions folder in the project in which you want to create the event definitions and select New > EPL Event Definition.
2. In the New EPL Event Definition dialog, select XML File and click Next.
3. Enter information in the following fields:
a. The Containing folder field is the folder where the file will be saved. By default, this is the currently selected folder of the current project, but you can select another folder or project using the Browse button.
b. In the File name field, specify the name of the file. It is recommended that you use TitleCase with the name and that the name does not contain special characters, except for the dollar ($) and underscore (_) characters.
Specifying the .mon file extension is optional as Software AG Designer will add the .mon file extension. Software AG Designer will not let you specify anything except .mon as a file extension.
c. The Package field is optional. Information in this field is an EPL package name.
4. Click Next.
5. In the XML file field, specify the name of the XML file on which you want to base the event. You can use the browse (...) button to navigate to the desired file. The drop-down arrow switches the scope between the workspace and the file system.
6. In the Event definition name field, specify the name you want to assign to the root level event.
7. Click Finish.
An EPL file is created that defines the root level event along with associated nested events.

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