4

I've written a flow in process builder which references an Apex class with @invocable method. I've written a test class for the same and it's passing as well. Now the problem is all the other test classes are failing giving this error

System.DmlException: Insert failed. First exception on row 0; first error: 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 3014B0000000ZwF. Contact your administrator for help.: [].

What should be the workaround for this?

7
  • Idea would be pretty easy -- go to debug logs, set it on, run tests and read error message
    – kurunve
    Feb 10, 2016 at 7:35
  • Error message I'm getting seems to be not of any particular help -- Error executing flow: Test_Flow, FlowDefId: 3004B0000004JUY, FlowVersionId: 3014B0000000ZwF 03:00:50.0 (337338947)|WF_FLOW_ACTION_ERROR_DETAIL|<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.
    – Sagnik
    Feb 10, 2016 at 8:03
  • Then you need to know what is get wrong with this flow. For example, some data doesnt exist. Create it until it works
    – kurunve
    Feb 10, 2016 at 8:09
  • Are the test classes for code on the same object as the process builder flow? If they are then you need to think about how the test records created will cause the process builder to trigger.
    – Dave Humm
    Feb 10, 2016 at 9:37
  • As @kurunve pointed out I wasn't creating test data to support the process builder flow hence it was giving error. Now that I've inserted test data it's working fine!
    – Sagnik
    Feb 10, 2016 at 11:23

1 Answer 1

1

The version you see, is version of flow that is behind Process Builder. You can find the process itself if you go to https://{instance_url}/designer/designer.apexp#id={version_id}

The link will open Flow designer and the title will be your Process's title.

1
  • 1
    Please include salient material from links here so users don't have to navigate away.
    – David Reed
    May 3, 2018 at 12:49

You must log in to answer this question.

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