Hear from Salesforce leaders on how to create and deploy Agentforce agents.
Contact Us 1-800-596-4880

First Successful Router

This version of Mule reached its End of LifeLeaving the Site on May 2, 2023, when Extended Support ended.

Deployments of new applications to CloudHub that use this version of Mule are no longer allowed. Only in-place updates to applications are permitted.

MuleSoft recommends that you upgrade to the latest version of Mule 4 that is in Standard Support so that your applications run with the latest fixes and security enhancements.

The First Successful router iterates through a list of configured processing routes until one of the routes executes successfully. If any processing route fails execution (throws an error), the router executes the next configured route.

If none of the configured routes execute successfully, the First Successful router throws an error.

First Successful Router Configuration Example

The following example shows a First Successful router configured with four processing routes:

Execution behavior for the previous example is as follows:

  1. The first route executes and fails because it tries to read a file that does not exist.

  2. The second route fails because it tries to access a variable that does not exist.

  3. The third route executes successfully and sets variable successfulRoute with value 3.

  4. The fourth route is not executed because the First Successful router stops executing routes after one of them completes successfully.