Chapter 2 Project Design Tutorial : Define the Debit Event

Define the Debit Event
In this task, you begin to build the project ontology by defining an event.
Learning Points
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.)
When you test the project (later), you will configure a Send Event activity, which will make use of the default destination.
More Information
Chapter 3, Working With Simple Events, Chapter 4, Working With Time Events, Chapter 5, Working With Advisory Events, in TIBCO BusinessEvents User’s Guide.
Task C Define the Debit Event
1.
In the FraudDetection project folder, create a folder and name it Events.
2.
Open the Events folder, right-click in the design panel, and select Add Resource > BusinessEvents Workbench > SimpleEvent and name the event Debit.
3.
In the Default Destination field, click the browse button () and in the Select a Resource dialog, select /Channels/RV.channel/DebitTransaction. Click OK to dismiss that dialog, then click Apply.
4.
Select the Properties tab for Debit, add the following properties and click Apply and Save.
 
Summary and Next Steps
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.