Sending an event to a process instance using the EJB interface

Steps for this task

  1. (Optional)   List the processes that are waiting for a specific event from the logged-on user.
    QueryResultSet result = 
         query("DISTINCT EVENT.PIID",
               "EVENT.NAME = 'OrderEvent'
                AND WORK_ITEM.REASON = WORK_ITEM.REASON.REASON_POTENTIAL_OWNER",
                null, null, null); 
  2. Send an event.
    The caller must be a potential owner of the awaited OrderEvent event or an administrator of the process instance, CustomerOrder.
    if (result.size() > 0)
    {
    	result.first();
    	Order input = new Order("Chocolate");
    	process.sendEvent ((PIID)result.getOID(1), "OrderEvent", 
                          new ClientObjectWrapper(input));
    }
    Sends the specified OrderEvent event to the waiting process instance and passes some order data.

Related concepts
Event activities
Queries on business-process objects in V5.0-style processes



Searchable topic ID:   t6maceae
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/wfapi/tasks/t6maceae.html

Library | Support | Terms of Use | Feedback