Event definitions are instances of the EventDefinition class.
Why and when to perform this task
An event definition is an instance of the class EventDefinition.
To create an event definition, first create a new instance of this class and
then populate it with property descriptions and extended data element descriptions.
After you have created an event definition, you can add it to the event catalog;
for more information, see
Adding an event definition to the event catalog.
Steps for this task
To create a new, empty event definition, create an instance of
EventDefinition: EventDefinition definition = new EventDefinition(name, parent);
The
parameters of this constructor are as follows:
- name
- The name of the event definition. This is the value of the extensionName attribute
for the events you are describing.
- parent
- The name of the parent event definition. If you do not want your event
definition to inherit any property descriptions or extended data element descriptions
other than those required by the Common Base Event specification, this parameter
should be event. If this parameter is null, the new event
definition is defined as a root event definition; a root event definition
can only be added to the catalog if it is empty, or if you intend to replace
the current root event definition.
Result
The returned object is a new unresolved event definition containing
no property descriptions or extended data element descriptions.
Example
The following code fragment creates a new event definition called
insurance_claim_start_auto,
which is a child of the event definition
insurance_claim_start:
EventDefinition definition = new EventDefinition("insurance_claim_start_auto",
"insurance_claim_start");
What to do next
You can now populate the event definition with property descriptions
and extended data element descriptions.