Pages

Friday, January 6, 2017

Salesforce: Workflow Action Failed to Trigger Flow

You build awesome Process Builder or Flow and it works as tested. Few days later, your user start complaining see ugly error as sample below. What is this mean? Is this mean Salesforce buggy, or you have successfully hack it?

Workflow Action Failed to Trigger Flow
The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 30128000000AgZ7. Contact your administrator for help.

Click here to return to the previous page. 

or something like this

Workflow Action Failed to Trigger Flow
The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 30190000000XmQs. Flow error messages: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help. 

Click here to return to the previous page.

The difference is the one below happened when PB call Flow and it fail, while the first one related to update record.

Actually, what this mean here, something is broken with Process Builder or Flow built into your org., it can be fail to update record because of validation rules, error in Flow, or etc.

In our blog earlier, we mentioned that prefix 301 is InteractionDefinitionVersion, but we can't really easily see that record content by putting into URL, or by query with SOQL. So, how to trace that 301 error is referring to which Process Builder or Flow?

The user who create the Process Builder will get email from FlowApplication, with subject "Error Occurred During Flow "flow name", this email will mentioned the flow name, but no Version Id information as in the screenshot above. If the user create that Process Builder not in office, how you can trace Version Id prefix 301 is related to what?

There are 2 options to find this:

1. Flow
Use Flow Designer to check if that Id is refer to which Process Builder or Flow -- remember that Process Builder is using Flow as it engine. Follow this Url https://na3.salesforce.com/designer/designer.apexp#Id=30190000000XmQs, change na3 to your salesforce instance and you should see the Flow Name which is Lead Share for this sample.



2. Workbench
Login to workbench, navigate to menu Info | Metadata Types & Components, select Flow from drop down and click Expand All. You should find that 301 Version Id from the components and get the Flow name, which is "Lead Share"



This is the Process Builder as result of our finding:




ReferenceValidation Rule in Workflow and Process Builder