Nav

To Reference One Flow from Another (Design Center)

By placing a Flow Ref component in a flow you can execute one flow from another within the same application. When Flow Ref is executed, it triggers the referenced flow. The referenced flow executes and returns the Mule event object to the original flow where execution proceeds after the Flow Ref component. Flow Ref is handy for reusing groups of components within the same Mule application.

  1. In Design Center, create an initial flow that starts with a trigger, and add one or more components.

  2. Create a second flow:

    • Click Flows - Plus.

      add flow
    • Rename the flow.

      rename flow
  3. Return to the first flow by clicking its name.

  4. Add a Flow Ref component anywhere in this flow. In the Flow field, select your second flow.

  5. In Flow Ref, click Go to go to second flow.

  6. Add components other than a trigger. The Flow Ref Component in the first flow triggers the second flow.

    The first flow starts executing and continues from the beginning of the flow to the Flow Ref component. Execution of the second flow begins. At the end of the second flow, execution switches back to execute any unexecuted components in the first flow.

In this topic: