Canceling a claimed activity

Why and when to perform this task

Sometimes it is necessary for someone with process administrator rights to cancel an activity that is claimed by someone else. This situation might occur, for example, when an activity must be completed but the owner of the activity is absent.

Steps for this task

  1. List the claimed activities owned by a specific person to find the ID of the activity in question.
    QueryResultSet result = 
         process.query("DISTINCT ACTIVITY.AIID",
                       "ACTIVITY.STATE = ACTIVITY.STATE.STATE_CLAIMED AND 
                        ACTIVITY.OWNER = 'Smith'
                        AND ACTIVITY.TEMPLATE_NAME = 'CustomerTemplate'",
                        null, null, null);
    
    This action returns a query result set that lists the activities claimed by the specified person, Smith.
  2. Cancel the claimed activity.
    if (result.size() > 0)
    {
    	result.first();
    	AIID aiid = (AIID) result.getOID(1);
    	process.cancelClaim(aiid);
    }
    This action returns the activity to the ready state so that it can be claimed by one of the other potential owners.

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



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

Library | Support | Terms of Use | Feedback