function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
michael.demegliomichael.demeglio 

Process Builder Error Handling

I have a simple process which updates all child records when the parent is updated. The problem I'm having is that occassionally a child record will have some data that was entered prior to a validation rule being created - when the process runs this child record fails validation, and in turn, causes the process to fail - returning a pretty cryptic error to the user. Is there a way to gracefully handle errors like these in Process Builder?
Sagar PareekSagar Pareek
No you cannot handle these errors in process builder.Process builder is not a finished product, still in BETA.
RishavRishav
Hii michael,
First thing we need to understnad that process builder is only a recreation of 'workflow , It is having better UI to create the workflow like functionality . only differnece is that here we got some more things as actions like flow,apex, etc. 
So first try to understand was it possible to handle the same scenario with traditional workflow.

Thanks 
Rishav
thinkdatathinkdata
but having a  {!$Flow.FaultMessage} handler seems pretty basic.  It makes users nervous when things just break with no explanation
Ziggy LeeZiggy Lee
If you have a way to identify those child records, I would suggest fixing the child record or have process to skip it.  

I have found Process Builder is too basic.  To get around this limitation, I have created flows without any screens or steps and have the process call it.  The process is very simple and the logic is in the screenless flow.  If there are any errors in the screenless flow, the logs have not been informative.  To work around this issue, I would create another flow with a screen to be able to input whatever data the screenless flow needs.  With this new flow, I have it call the screenless flow.  When it errors, I have been able to use the logs to figure out what is wrong with the screenless flow.

If you are really good, then you only have to create one flow.  If not, create another one and resue the original flow.
Marco BadorrekMarco Badorrek
@Ziggy Lee

Since when can a headless flow trigger a flow with screen or include a screen element?
Based on my knowledge this is not working today. So your resolution makes no sense.
 
Ziggy LeeZiggy Lee
@marco badorrek

With the Process Builder, you can create a process that calls a flow which is screenless and has no steps.  If this flow fails, how do you debug the flow?

A way to debug is to create a new flow that calls your original screenless flow.  This new flow has a screen where a user can pass the necessary data to the screenless flow.  You manually call the new flow.  When it errors, you can look at the logs.

When I did this, the logs had more information for me to figure out what was going on.  Also, I did not have to modify the original screenless flow, only to fix the issue.

I hope this clear things.  Thanks for you reply.
 
NSK000NSK000
Hi guys,
Can you please help me with this error.

Error element myWaitEvent_myWait_myRule_3_event_0_SA1 (FlowRecordUpdate).
The flow tried to update these records: null. This error occurred: CANNOT_EXECUTE_FLOW_TRIGGER: The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3017A0000004X7T. Flow error messages: An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.. For details, see API Exceptions.

This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.
Flow Details
Flow Name: Accounting_Process_When_PO_Status_is_Closed_Issued_to_Vendor
Type: Workflow
Version: 5
Status: Active
Flow Interview Details
Interview Label: Accounting_Process_When_PO_Status_is_Closed_Issued_to_Vendor-5_InterviewLabel
Current User: Siva Kishore Nandyala (0057A000001aFk1)
Start time: 6/1/2017 9:26 AM
Duration: 3,575 seconds
How the Interview Started
Siva Kishore Nandyala (0057A000001aFk1) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = a4R7A000000S7CmUAK
myVariable_current = a4R7A000000S7CmUAK
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "6/1/2017 9:26 AM"
DECISION: myPreWaitDecision_myWait_myRule_5
ASSIGNMENT: myWaitAssignment_myWait_myRule_5
{!cancelWaits} Add myWait_myRule_5
Result
{!cancelWaits} = "[myWait_myRule_5]"
DECISION: myPreWaitDecision_myWait_myRule_3
Executed this outcome: myPreWaitRule_myWait_myRule_3
Outcome conditions: and
1. {!myVariable_current.Advance_Payment_Required__c} (false) Equals false
2. {!myVariable_current.Status__c} (Closed - Issued to Vendor) Equals Closed - Issued to Vendor
3. {!myVariable_current.PO_Final__c} (false) Equals false
4. {!myVariable_current.Invoice_Included__c} (false) Equals false
5. {!myVariable_current.Employee_Reimbursement__c} (false) Equals false
Logic: All conditions must be true (AND)
DECISION: myDecision
DECISION: myDecision2
Executed this outcome: myRule_3
Outcome conditions: and
1. {!myVariable_current.Advance_Payment_Required__c} (false) Equals false
2. {!myVariable_current.Status__c} (Closed - Issued to Vendor) Equals Closed - Issued to Vendor
3. {!myVariable_current.PO_Final__c} (false) Equals false
4. {!myVariable_current.Invoice_Included__c} (false) Equals false
5. {!myVariable_current.Employee_Reimbursement__c} (false) Equals false
Logic: All conditions must be true (AND)
DECISION: myRule_3_pmetdec
WAIT: myWait_myRule_3
The waiting conditions for the following wait events were met.
Wait Event: myWaitEvent_myWait_myRule_3_event_0
Waiting Conditions:
1. {!myWaitEvent_myWait_myRule_3_event_0_postActionExecutionVariable} (false) Equals false
Logic: All conditions must be true (AND)

Event Type: Alarm: Absolute Time
Base Time = {!myVariable_waitStartTimeVariable} (6/1/2017 9:26 AM)
Offset Unit = Hours
Offset Number = 1
Result
Started waiting at 6/1/2017 9:26 AM.

The interview started waiting at 6/1/2017 9:26 AM.
The interview was resumed at 6/1/2017 10:26 AM by Siva Kishore Nandyala (0057A000001aFk1).

WAIT: myWait_myRule_3
Wait event myWaitEvent_myWait_myRule_3_event_0 occurred.
The following values from the event were assigned to flow variables.
None.
RECORD UPDATE: myWaitEvent_myWait_myRule_3_event_0_SA1
Find all Purchase_Order__c records where:
Id Equals {!myVariable_current.Id} (a4R7A000000S7CmUAK)
Update the records’ field values.
PO_Final__c = true
Result
Failed to update records that meet the filter criteria.

Error Occurred: The flow tried to update these records: null. This error occurred: CANNOT_EXECUTE_FLOW_TRIGGER: The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3017A0000004X7T. Flow error messages: An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.. For details, see API Exceptions.
 
Pratibha Pandit 7Pratibha Pandit 7
@NSK000 : Did you get any solution, as i am also getting the same exception.
In my case... I have a field Unique Key in my custom object, i am updating this Field via process builder. So when i am doing negative testing, as it should show some sesible error: it is throwing me below exception in my Partial copy Sandbox:

Save failed. See highlighted records.
The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3011D0000004DEs. 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.


Where as in Fullcopy sandbox it is throwing below error, which atleast make some sense:

Save failed. See highlighted records.
We can't save this record because the “Seeds Allocation Unique key Update” process failed. Give your Salesforce admin these details. This error occurred when the flow tried to update records: DUPLICATE_VALUE: duplicate value found: UniqueKey__c duplicates value on record with id: a1K2a0000009bJu. You can look up ExceptionCode values in the SOAP API Developer Guide. Error ID: 432536086-3742 (1873469895).
2018-05-30 00:57:10



Can anyone let me know why is the different error messages, where as the process builder is defined similar.

Thanks