Event Bind Examples

The example code below expects these event binds:

Important: The example scripts should not be used as-is without thorough testing, including updating the script to match object and link types that exist on your system.

Checking Current Event

From actions and conditions used as filters / generators in an outbound integration endpoint, you can obtain the current event using a binding as shown above. The event will be either a core STEP event (BasicEventType Enum) or a derived event (DerivedEventType interface).

This code checks whether current event is a Core event:

Copy
if (currentEvent instanceof com.stibo.core.domain.eventqueue.BasicEventType) {
// It is a core event
}     

This code checks whether current event is a core Modify event:

Copy
if (currentEvent.equals(com.stibo.core.domain.eventqueue.BasicEventType.Modify)) {
// It is a core Modify event
}  

This code checks whether current event is a Derived event:

Copy
if (currentEvent instanceof com.stibo.core.domain.eventqueue.DerivedEventType) {
// It is a derived event
}       

This code checks whether current event is derived 'WebModify' event:

Copy
if (currentEvent.equals(webModify)) {
// It is a derived WebModify event
}

Queuing a Derived Event

From an action, you can queue derived events using the following method on the EventQueue interface:

Copy
queueDerivedEvent(DerivedEventType event, Node node)         

For a generator action hooked into an outbound integration endpoint, you can queue a derived event on a current event queue as follows (using bindings described above):

Copy
currentEventQueue.queueDerivedEvent(webModify, node);

From any action, you can queue a derived event on an event queue via the 'Event Queue' and 'Event Type' bindings:

Copy
oiep2.queueDerivedEvent(webModify, node);