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
QueryResultSet result = process.query("DISTINCT ACTIVITY.AIID", "ACTIVITY.STATE = ACTIVITY.STATE.STATE_STOPPED AND PROCESS_INSTANCE.NAME='CustomerOrder'", null, null, null);
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.