Why and when to perform this task
If an activity causes a fault to occur, the fault type determines
the actions that you can take to repair the activity.
Steps for this task
- List the staff activities that are in a stopped state.
QueryResultSet result =
process.query("ACTIVITY.AIID",
"ACTIVITY.STATE = ACTIVITY.STATE.STATE_STOPPED AND
ACTIVITY.KIND=ACTIVITY.KIND.KIND_INVOKE",
(String)null, (Integer)null, (TimeZone)null);
This action returns a query result set that
contains stopped invoke activities.
- Read the name of the fault.
if (result.size() > 0)
{
result.first();
AIID aiid = (AIID) result.getOID(1);
ActivityInstanceData activity = process.getActivityInstance(aiid);
ProcessException excp = activity.getUnhandledException();
if ( excp instanceof ApplicationFaultException )
{
ApplicationFaultException fault = (ApplicationFaultException)excp;
String faultName = fault.getFaultName();
}
}