Working with Events in Rules

At runtime, event instances that are created using rules are not automatically asserted.

You must explicitly assert such events, for example using the Event.assertEvent() function.

Events that are created from incoming messages, on the other hand, are automatically asserted.

STIBCO BusinessEvents includes two functions that allow you to send simple events out to another application: Event.sendEvent() and Event.routeTo().

  • Event.sendEvent() automatically sends the event to its default destination.
    Note: The Event.sendEvent() function does not recognize whether the event is Put or Take. Use ActiveSpaces catalog function for Put or Take operations.
  • Event.routeTo() takes a destination as an argument, ignoring the event’s default destination.

    With routeTo you can direct an event to a destination on a different channel from the event’s default destination. You can also override the properties of the destination, for example, the subject.

    You cannot, however, override the properties of the channel itself, for example, the network field in a Rendezvous channel.

You can use two methods to schedule simple events:

  • Rule-based time events schedule the assertion of simple events.
  • Scheduler functions schedule the sending of simple events to their default channels.