Preventing Process Instances from Failing and being Purged if a System Error Occurs

Unexpected system errors can result in the failure of process instances that would otherwise have continued to run - for example, if a database connection failure occurs during an update, or a system memory error occurs while a script is running.

If a system error causes a process instance activity to throw a Java exception, Process Manager places the process instance in either a SUSPENDED, HALTED or FAILED state, depending on the error handling configuration that has been applied at the activity, process and/or system-wide levels. The BPM runtime supports two types of error handling - suspendOnError and haltOnError:

  • suspendOnError - You can configure Process Manager to suspend process instances that throw a Java exception as a result of a system error. You can then investigate and deal with the system error and, if appropriate, resume the suspended process instances.

    suspendOnError is only supported by a process application that was deployed from a pre-3.5.10 version of TIBCO Business Studio.

  • haltOnError - You can configure either Process Manager, individual processes or individual activities within processes, to halt process instances that throw a Java exception - for example, as a result of a system error. You can then investigate and deal with the system error and, if appropriate, resume or retry the halted process instances.

    haltOnError is only supported by a process application that was deployed from TIBCO Business Studio version 3.5.10.

Note: Process instances that have failed are not purged by default. However, failed process instances can be automatically purged by adding the JVM property com.tibco.bx.autoDeleteFailedProcesses="yes" in the BPM node configuration in Administrator. This must be done on each BPM node, and only affects process instances that fail after setting the property.

To delete process instances that failed before setting the property, use the purgeTerminatedProcessInstances API using the processInstances parameter. For more information see TIBCO Active matrix BPM Developer's Guide.

Procedure

  • Use suspendOnError and/or haltOnError error handling. See "Configuring Error Handling Behavior for Process Instances" in TIBCO ActiveMatrix BPM Administration for more information on how to do this.