In this task, you begin to build the project ontology by defining some events — or strictly speaking, event
types. Before you define event types in a real-world project, you first examine the incoming and outgoing messages, as well as messages that you want to occur within the application, and configure each event type’s characteristics accordingly. You can use inheritance (as demonstrated here) to simplify configuration.
BusinessEvents provides various kinds of events. Simple events are used in this tutorial to bring messages into the application. In addition you can use SOAP events, time events and advisory events, which you can learn about in the product documentation.
What is an event? The term
event is overloaded: it means an activity that happens, and the definition of an object that represents the activity in BusinessEvents (an event type), and an instance of that event definition.
How are events (event instances) created? Simple event types are created at design time. Event instances are generally created using data in incoming messages. When a destination receives a message, it creates an event to hold the information from the message. Events from channels are automatically asserted into the Rete network, where their presence generally triggers rules (if all rule conditions are met).
Simple events can also be created by rules and rule functions. Events created this way are not asserted automatically because they could be outbound events, to be sent to a destination. You must explicitly assert such internally created events as needed.
What is an event payload? Just as messages have properties and a message body, events can have properties and payloads. The payload is optional. It is used to hold more complex data, for example, SOAP messages. (The events in this example do not use a payload.)
What is a default destination? Outbound events of the same event type are often sent to the same destination. To simplify the process of sending those events, you can specify a default destination in the event type.
What is a default event? The default event configured for a destination is used to hold information transferred from an incoming message, when no event type is specified in the message.
See Default Destinations and Default Events in
TIBCO BusinessEvents Architect’s Guide for more details. (The FraudDetection project does not use these features.)
Rules that apply to a parent type also apply to its child types Concept and event types use inheritance in a similar way to Java classes. Because
rules that apply to a parent type also apply to its child types, it is generally not advisable to create many levels of inheritance. However it can be a useful technique. In this tutorial the
AccountOperations event is the parent of both the
CreateAccount and
Debit events. You’ll see why in a later section.
This event is a parent to events that are used in the project. It has one property: AccountId. All its child events inherit this property, and extend the parent by adding more.
For example purposes, the information needed to create an account is an ID, a balance, and a monthly average balance (for the fraud detection calculation). The ID is inherited from the
AccountOperations event.