Retrying the execution of a stopped activity

Why and when to perform this task

If an activity in an interruptible process encounters a system exception or an unconnected fault terminal and the associated activity template specifies that the activity stops when an error occurs, the activity is put into the stopped state so that it can be repaired. You can retry the execution of the activity by passing a new input message.

Steps for this task

  1. List the stopped activities.
    QueryResultSet result = 
         process.query("DISTINCT ACTIVITY.AIID",
                       "ACTIVITY.STATE = ACTIVITY.STATE.STATE_STOPPED AND 
                        PROCESS_INSTANCE.NAME='CustomerOrder'",
                        null, null, null);
    
    This action returns the stopped activities for the CustomerOrder process instance.
  2. Retry the execution of the activity.
    if (result.size() > 0)
    {
    	result.first();
    	AIID aiid = (AIID) result.getOID(1);
    	Order input = new Order("Chocolate");
    	process.forceRetry(aiid, new ClientObjectWrapper(input), true);
    }

    For more information, see the Javadoc.

    This action retries the activity. If a system error occurs, the continueOnError parameter determines whether the activity stays in the stopped state. In the example, continueOnError=true. If an error occurs during processing of the forceRetry request, the activity is put into the failed execution state. Navigation continues and the process is put into the failing state.

Related concepts
Queries on business-process objects in V5.0-style processes
Related tasks
Forcing the completion of an activity



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

Library | Support | Terms of Use | Feedback