Workflow Fails Randomly

If your workflow fails randomly, review the following information and try the suggested resolutions.

Issue Description

A workflow executes as expected on multiple transactions or records, but then the workflow randomly does not execute properly. The rate that the workflow fails to execute at is extremely low: the workflow fails to execute properly on approximately one out of every thousand transactions or records. When you check the workflow history for the transaction or record, it shows that the workflow and actions executed but there is no corresponding effect on the transaction or record.

Cause

The workflow fails to execute properly because the Workflow Instance Data and Record Data are not in sync. This behavior is referred to as a Transaction Management problem. The Workflow Instance Data and Record Data are initially synchronized, but when any error occurs, the transaction or record is rolled back by the Transaction Management process while the workflow data is not rolled back. The workflow remains in its current state, which is not the same state that the transaction or record is in. Consequently, the Workflow Instance Data and Record Data become out of sync.

For example, if this error occurred with an approval workflow, the workflow would remain in the approved state and the record would be in a state pending approval.

Resolution

If you have transactions or records that appear to be stuck in a workflow state, try any of the following to resolve the issue:

  • Use the Mass Updates feature to move the workflow to the same state that the transaction or record is in. For more information about transitioning an active workflow on a record outside of the defined workflow execution path, see Mass Transitioning Workflow Instances.

  • Cancel the current instance of the workflow. Rerun the workflow on the transaction or record.

  • Recreate the transaction or record.

Related Topics

Canceling a Single Workflow Instance
Mass Canceling Workflow Instances
Testing and Troubleshooting Workflows

General Notices