• No results found

Why Did My Flow Interview Fail?

In document Visual Workflow Guide (Page 159-164)

EDITIONS

Available in: both Salesforce Classic and Lightning Experience

Available in:

Enterprise

Performance

Unlimited

Developer To troubleshoot a failed flow interview, use the flow fault email. You can also set up temporary

Screen or Send Email elements to identify the problem.

IN THIS SECTION:

Emails About Flow Errors

Every time a flow interview fails, the admin who created the associated flow gets an email. The email includes the error message from the failure and details about every flow element that the interview executed.

Limitations of Emails About Flow Errors (Beta)

The email about errors in flow interviews has some limitations for Screen, Lookup, Create, and Subflow elements—as well as some general limitations.

Add Temporary Elements to a Flow

Add Screen or Send Email elements to the flow so you can check what the resources’ values are at any given time. Once you’ve solved the problem, delete temporary Screen elements.

Troubleshoot Flow URLs

If you’re distributing a flow and the custom button, custom link, or a direct flow URL isn’t working as expected, verify the referenced flow. In addition, verify its variables if you’re passing values into a flow from the URL.

Emails About Flow Errors

EDITIONS

Available in: both Salesforce Classic and Lightning Experience

Available in:

Enterprise

Performance

Unlimited

Developer Every time a flow interview fails, the admin who created the associated flow gets an email. The

email includes the error message from the failure and details about every flow element that the interview executed.

Note: This release contains a beta version of the flow error email that is production quality but has known limitations. You can provide feedback and suggestions for the flow error email on the IdeaExchange.

If the interview failed at multiple elements, the admin recieves multiple emails, and the final email includes an error message for each failure. If a flow uses fault connectors, its interviews can fail at multiple elements.

Example:

An error occurred at element Apex_Plug_in_1.

List index out of bounds: 0.

An error occurred at element Fast_Delete_1.

DELETE --- There is nothing in Salesforce matching your delete

criteria.

An error occurred at element Email_Alert_1.

Missing required input parameter: SObjectRowId.

SEE ALSO:

Limitations of Emails About Flow Errors (Beta) Customize What Happens When a Flow Fails Why Did My Flow Interview Fail?

Limitations of Emails About Flow Errors (Beta)

EDITIONS

Available in: both Salesforce Classic and Lightning Experience

Available in:

Enterprise

Performance

Unlimited

Developer The email about errors in flow interviews has some limitations for Screen, Lookup, Create, and

Subflow elements—as well as some general limitations.

Note: This release contains a beta version of the flow error email that is production quality but has known limitations. You can provide feedback and suggestions for the flow error email on the IdeaExchange.

General

If the user who started the flow doesn’t have a first name, null replaces the user's first name in the “How the Interview Started” section.

Variable assignments display in this pattern: {!variable} (prior value) = field/variable (new value). If the variable had no prior value, the parentheses display as empty. For example: {!varStatus} () = Status (Delivered)

If you install a flow from a managed package, error emails for that flow’s interviews don’t include any details about the individual flow elements. The email is sent to the user who installed the flow.

Screen elements

Password fields display in plain text, just like if you reference a password field in a Display Text field.

Lookup elements

The email displays lookup elements as “query” elements. Record Lookup displays as Record Query, and Fast Lookup displays as Fast Query.

Create elements

If you don't assign the created record’s ID to a specific variable, the email displays the following line in the Result section of Record Create and Fast Create elements.

{!null} = null

Subflow elements

The merge field annotation ({!variable} as opposed to just variable) is missing for variables in a referenced flow. For example, when an interview enters a subflow and gives details about the inputs, the subflow's variable is subVariable instead of {!subVariable}.

Limitations of Emails About Flow Errors (Beta) Why Did My Flow Interview Fail?

If you see multiple “Entered flow ReferencedFlowName version ReferencedFlowVersion” messages with no

“Exited ReferencedFlowName version ReferencedFlowVersion” messages in between them, the flow user navigated backwards. To prevent this scenario, adjust the navigation options in the first screen of the referenced flow so that the user can’t click Previous.

SEE ALSO:

Emails About Flow Errors Why Did My Flow Interview Fail?

Add Temporary Elements to a Flow

EDITIONS

Available in: both Salesforce Classic and Lightning Experience

Available in:

Enterprise

Performance

Unlimited

Developer

USER PERMISSIONS To open, edit, or create a flow in the Cloud Flow Designer:

“Manage Force.com Flow”

Add Screen or Send Email elements to the flow so you can check what the resources’ values are at any given time. Once you’ve solved the problem, delete temporary Screen elements.

1. Create a single text template that contains the values of all resources and the fault message.

2. For each fault path, use the text template to configure one of the following elements.

A Screen element that uses the text template in a Display Text Field. (Only if the flow’s type supports Screen elements.)

A Send Email element that uses the text template as the body and your email as the recipient.

A Post to Chatter element that uses the text template as the message. Consider creating a Chatter group specifically for flow errors.

3. Test the flow.

Example: Here’s a text template for the Calculate Discounts on Opportunities flow in the Cloud Flow Designer Workbook.

RESOURCE VALUES for “Calculate Discounts on Opportunities”

opptyID: {!opptyID}

AccountID: {!AccountID}

AccountRevenue: {!AccountRevenue}

Full_Discount outcome: {!Full_Discount}

Partial_Discount outcome: {!Partial_Discount}

Discount: {!Discount}

ERROR

{!$Flow.FaultMessage}

After each element in the flow, add a temporary Post to Chatter element. Each Post to Chatter element is configured to use:

The text template as the post’s message

The “Flow Troubleshooting” Chatter group as the post’s target

Configure the Record Lookup and Record Update elements’ fault connecters so that they route to the Post to Chatter elements.

Add Temporary Elements to a Flow Why Did My Flow Interview Fail?

This way, the flow posts to the Chatter group after the Record Lookup, Decision, Assignment, and Record Update elements are executed. Each post provides insight into the values of each resource throughout the flow. If the flow fails, the error is included in the Chatter posts.

After you identify and fix the problem with the flow, remove the temporary elements.

SEE ALSO:

Why Did My Flow Interview Fail?

Add Temporary Elements to a Flow Why Did My Flow Interview Fail?

Troubleshoot Flow URLs

EDITIONS

Available in: both Salesforce Classic and Lightning Experience

Available in:

Enterprise

Performance

Unlimited

Developer If you’re distributing a flow and the custom button, custom link, or a direct flow URL isn’t working

as expected, verify the referenced flow. In addition, verify its variables if you’re passing values into a flow from the URL.

To make sure that the URL can find the right flow, verify that:

The flow that the URL references hasn’t been deleted or deactivated.

The flow name is spelled and capitalized correctly. It must be an exact, case-sensitive match to the flow’s Unique Name.

If your flow URL references a specific flow version, verify that the version hasn’t been deleted or deactivated.

If you’re using the URL to pass values into the flow and the URL can’t access the variable, the parameter that references the variable is ignored.

To make sure that the URL can find the right flow variable, verify that each variable you’re trying to pass values into:

Is spelled and capitalized correctly. It must be an exact, case-sensitive match to the variable.

Allows input access. The variable’s Input/Output Type must be set to “Input Only” or “Input and Output.”

Hasn’t been renamed in the flow.

Hasn’t been removed from the flow.

Isn’t an sObject variable or an sObject collection variable.

In addition, make sure the value that you’re trying to pass into the variable is compatible with the variable’s data type and is correctly formatted.

SEE ALSO:

Set Flow Finish Behavior with a Flow URL Set Flow Variables from a Flow URL Why Did My Flow Interview Fail?

Troubleshoot Flow URLs Why Did My Flow Interview Fail?

In document Visual Workflow Guide (Page 159-164)

Related documents