Learn how to put your digital team to work with MuleSoft for Agentforce.
Contact Us 1-800-596-4880

Custom Policy Exception Blocks Reference

You can define before and after exception blocks in custom policy definitions to enhance the catch exception strategy of a flow without the need to modify it. The following versions support the custom policy exception blocks:

API Gateway/Mule Runtimes:

  • v3.8.4 >= version < v4.0.0

  • v2.2.1 >= version < v3.8.0

  • v2.1.2 >= version < v2.2.0

The following diagram shows the happy path Before > Flow > After and the error path Before Exception > Exception Strategy > After Exception.

Exception handling flow diagram showing paths before and after exception block implementation

Any exception in any part of the happy path stops the execution of the happy path and triggers execution of the error path. Any exception in either the before-exception or after-exception stops the execution of the error path. If the error is raised in the exception strategy, the after-exception is executed.

The following example custom policy shows how to implement before and after exception blocks: