Processing person activities using the EJB interface

Steps for this task

  1. List the activities belonging to a logged-on person that are ready to be worked on:
    QueryResultSet result = 
         process.query("ACTIVITY.AIID", 
                       "ACTIVITY.STATE = ACTIVITY.STATE.STATE_READY AND
                        WORK_ITEM.REASON = 
                            WORK_ITEM.REASON.REASON_POTENTIAL_OWNER",
                        null, null, null); 
    
    This action returns a query result set that contains the activities that can be started by the logged-on person.
  2. Claim the activity to be worked on:
    if (result.size() > 0)
    {
    	result.first();
    	AIID aiid = (AIID) result.getOID(1);
    	{
    		ClientObjectWrapper input = process.claim(aiid);
    		Order activityInput = (Order) input.getObject();
    	}
    }
    When the activity is claimed, the input message of the activity is returned.
  3. When work on the activity is complete, complete the activity.
    OrderNo output = new OrderNo(4711);
    process.complete (aiid, new ClientObjectWrapper(output));

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



Searchable topic ID:   t6macpae
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/t6macpae.html

Library | Support | Terms of Use | Feedback