mitchspano/apex-trigger-actions-framework

Maximum recursion depth limit exceeded for Invocable.Action

sphuah opened this issue · 1 comments

sphuah commented

Expected Behavior

The framework can handle the invocation of more than 3 Salesforce Flows in a single transaction.

Actual Behavior

The framework cannot handle the invocation of more than 3 Salesforce Flows in a single transaction.

Steps to Reproduce the Problem

  1. Flow 1 on Object 1 executes and updates Object 2
  2. Flow 2 on Object 2 executes and updates Object 3
  3. Flow 3 on Object 3 executes and updates Object 4
  4. Flow 4 on Object 4 fires and hits the following system limit:
    Error Occurred: The flow tried to update these records: null. This error occurred: LIMIT_EXCEEDED: System.LimitException: We couldn’t run the invocable action because you exceeded the maximum recursion depth of 3 for the Invocable.Action class. . You can look up ExceptionCode values in the SOAP API Developer Guide.

Specifications

Hi Mitch. I was referred to you by CarlV. We are looking for guidance on how to use this framework with Salesforce Flows. The framework appears to to be restricted to a maximum of 3 Flows that can be invoked per transaction due to the system limit "maximum recursion depth of 3 for the Invocable.Action class". Please advise if we are using the framework correctly and how best to structure our Flows so we are not constrained by this system limit. Thanks!

  • Version: 0.2.5
  • Platform: Salesforce

Thanks for bringing this to my attention. Unfortunately, this depth limit of 3 is not documented in the documentation for the Invocable.Action class.

I have added a some guidance to the README regarding the safe use of Trigger Action Flows.