Checking which fault occurred for a stopped invoke activity

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

  1. 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",
                        null, null, null); 
    This action returns a query result set that contains stopped invoke activities.
  2. Read the name of the fault.

    This is the local part of the fault queue name.

    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();
      }
    }

Terms of use | | Broken links

Last updated: Mon Mar 27 18:04:06 2006

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