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 or later releases.
For more information about properties files, see BPM Properties Files.
This 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 purgeTerminatedProcessInstances.
Procedure
- Use suspendOnError and/or haltOnError error handling. For more information about how to do this, see Configuration of Error Handling Behavior for Process Instances.