Chapter 4 Working With Time Events : Understanding Time Events

Understanding Time Events
Time events are timers that are used to trigger rules. TIBCO BusinessEvents offers two kinds of time events, repeating and rule-based.
Repeating Time Events
You can configure a time event to repeat at a configurable time interval. For example, if you configure a time event to repeat every thirty milliseconds, then every thirty milliseconds BusinessEvents creates a new time event of that type. You can configure a repeating time event to create a specified number of events at each interval. The time interval begins during engine startup (see Appendix A, Engine Startup and Shutdown Sequence).
Rule Based Time Events
A rule based TimeEvent resource has only a name and description. You can schedule an event to be asserted into working memory using its ontology function, ScheduleTimeEventName() in a rule. (see Rule Based TimeEvent Function Reference). You can schedule the event to be asserted after a period of time, and you can pass information to the event and specify its time to live. You can call the ScheduleTimeEventName() function in different places with different time delays.
You can use rule based time events in various ways. For example, you might write rules that check for delays in order fulfillment:
1.
A new Order event is asserted, and Rule A (which has Order in its scope) creates a time event T and configures it to be asserted in sixty minutes, and passes the order ID as the closure parameter value. (The rule also sends the order details to another system.)
2.
3.
The assertion of time event T triggers Rule B, which has T in its scope. Rule B checks the order status. If the order is delayed, it sends out an alert.