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 (also known as an event type), and also an instance of that event definition.
How are events (event instances) created? Event types are created at design time. Event instances are created using data in incoming messages. When a destination receives a message, it creates an event to hold the information from the message. Events can also be created by rules. Events are automatically asserted into working memory, where their presence will trigger rules (if all rule conditions are met). Outgoing messages are created using events that are sent to destinations.
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. The Debit event does not use a payload. To learn about payloads, see
Chapter 3, Working With Simple Events of
TIBCO BusinessEvents User’s Guide.
What is a default destination? Events of a certain 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. You can send an event to the default destination of its event type using the
Event.sendEvent() function. (As needed, you can send an event to a specific destination using the
Event.routeTo() function which lets you specify the target destination.)
Now you have defined an event type. When you configure events in your working projects, you will examine the messages that you want to listen for, and configure the event characteristics accordingly.
Next you will set Debit as the default event for the DebitTransaction destination—so that a Debit event instance will be created and asserted into working memory whenever a message arrives at the DebitTransaction destination.