Index Changes

BPELSE Event Dispatching and Listener Framework


To allow different parties to listen for BPELSE events, events generated from BPELSE are posted to a queue and dispatched to interested event listeners asynchronously.


 interface BPELEvent

       readonly attribute string id;
       readonly attribute string engineid;
       readonly attribute string bpid;
       readonly attribute string processid;
       readonly attribute EventType type;
       readonly attribute datetime time;


Implementation of BPELEvent includes BPInstanceEvent, ActivityEvent, VariableEvent

 interface BPInstanceEvent, : BPELEvent


 interface ActivityEvent : BPELEvent
      readonly attribute long activityid;
      readonly attribute long activityXpath;

 interface VariableEvent : BPELEvent
       enum VariableType {Input, Output, Fault, Old, New}; 
       readonly attribute long activityid;
       readonly attribute long activityXpath;
       readonly attribute map<VariableType, list<Variable>> variables;

 interface Variable
       enum DataType {String, Number, Boolean, Date, Complex_Type, Element, Message}; 

       readonly attribute DataType type;
       readonly attribute long scopeid;
       readonly attribute long varid;
       readonly attribute long varname;
       readonly attribute string value;
       readonly attribute boolean isFault;

ActivityUnit creates the event and posts to the Event queue (BPELProcessManager.postEvent(Event))

Event Queue

The EventQueue is an instance of LinkedBlockingQueue

Event Dispatcher

Event Dispatcher is a thread managed by Engine as BPELSEInOutThread. It does blocking read on event queue, and dispatches the event to each event listener, which either processes or ignores the event.

Event Listener

Event listener processes the event, such as persists to the DB, sends to another component or webservice
  interface EventListener : Thread
      void processEvent (in BPELEvent event); 

BPEL engine finds all event listeners by search from the context classloader for META-INF/services/com.sun.jbi.engine.bpel.core.bpel.event.BPELEventListener, if found, each line in the file specifies an event listener impl class. BPEL engine creates an instance of the event listener and registers it with event dispatcher

JSPWiki v2.4.100
« Home Index Changes Prefs
This page (revision-4) was last changed on 10-Aug-07 07:51 AM, -0700 by MeiWu