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
NicGallerNicGaller 

Error handling in auto launched flow

I have a flow that is lanched from Apex code:
 
Flow.Interview.MyCustomApprovalFlow flow = new Flow.Interview.MyCustomApprovalFlow(params);
flow.start();


It does some custom logic to check over the opportunity line items then submits the opportunity for approval.  There is no UI (in fact this is being launched from a future method).

This works great except for the error handling.  I have connected a "FAULT" connector from the "Submit for Approval" element to send an error message to the opportunity's owner, but that is not being followed - instead I get a generic "Unhandled process fault" email.

What do I need to do to properly handle the errors?  Do I need to handle them in the code that launches the flow somehow?  This is how the element is set up right now:

 Submit for approval element
 
ShashankShashank (Salesforce Developers) 
If you are still facing this issue, please see if this helps: http://salesforce.stackexchange.com/questions/44745/unhandled-process-fault-exceptions-in-flows-after-summer-14