0

I have an auto launched flow that is called upon by a screen flow. I have created fault paths on 2 DML elements, and the fault paths end with an assignment element.

When I test the subflow to create a fault at the first fault path (Get Billing Contact), the flow ignores it and keeps going to the next element anyway (Get Overdue Invoices). How do I stop the flow and force it to use the fault line and effectively end the flow ?

Snapshot of flow

debug mode

3
  • Have you tried debug mode to try and replicate the fault condition? Nov 9, 2022 at 3:14
  • I did try debug mode before. I have now updated my snapshots to show that debug proceeds to the next step despite not finding records in the Get Billing Contact element
    – Arnaud
    Nov 9, 2022 at 4:40
  • 3
    the fault path is executed at runtime only when its source element results in an error. Not finding any records is not an error. perhaps you might need to add a decision element to check if the list is empty or not instead of the fault connector
    – McCubo
    Nov 9, 2022 at 7:58

1 Answer 1

0
  1. The only way for the flow to through error and follow the fault line on the Get Billing Contact Element is by throwing an System.LimitException
  2. While you cannot throw an System.LimitException manually, it will only throw when the get Element Retrieve more than 50k records that is more than the one defined in the governor limits
  3. You need not use a fault connector instead use a decision element if/else to check if the array is Empty or not
  4. If not execute the assign operation and stop
  5. Else proceed with other set of operations
  6. Fault path are used to catch Exception either system generated or user generated in a friendly way.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .