Deleting a process instance

Why and when to perform this task

Process instances are only automatically deleted when they complete if this is specified in the process template from which the process instances are derived. To delete all finished process instances:

Steps for this task

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

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



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

Library | Support | Terms of Use | Feedback