Deleting task instances

Why and when to perform this task

Task instances are only automatically deleted when they complete if this is specified in the associated task template from which the instances are derived. The following example shows how to delete all of the task instances that are finished and are not automatically deleted.

Steps for this task

  1. List the task instances that are finished.
    QueryResultSet result = 
         task.query("DISTINCT TASK.TKIID",
                    "TASK.STATE = TASK.STATE.STATE_FINISHED", 
                     null, null, null);
    This action returns a query result set that lists task instances that are finished.
  2. Delete the task instances that are finished.
    while (result.next() )
    {
    	TKIID tkiid = (TKIID) result.getOID(1);
    	task.delete(tkiid);
    }

Terms of use | | Broken links

Last updated: Tue Dec 06 04:14:42 2005

(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)