Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

Flow Reference Component Reference

Use a flow reference component in flow to direct Mule to send a message to another flow for processing. When a message reaches a flow reference component in a flow, Mule sends the message to another flow according to the configuration of the flow-ref attributes.

Note that when Mule passes a message to another flow via a flow reference, the message is not carried via a transport. Thus, any outbound properties on the message remain outbound properties rather than being converted into inbound properties (as they would be if the message crossed the transport barrier.

A flow reference can route messages to any type of flow within the same application. Refer to Flows and Subflows for more information.

Configuration

  1. Place the flow reference component on the canvas at the point where you want the current flow to call another flow. 

    flowref

  2. Open the flow reference component’s Properties Editor to configure it according to the table below.

    flowrefconf

    Attribute Value Description

    Display Name

    Flow Reference

    Customize to display a unique name for the component in your application.

    Flow name

    Mule auto-populates this drop-down with the flow names in your application

    Select the name of the flow that you want to invoke using this flow reference.

Add a flow-ref element to your flow, then configure its attributes according to the table below. Refer to code sample below.

Element Description

flow-ref

Insert the flow-ref element into your code at the point where you want the current flow to call another flow.

Element Attribute Description

name

Specify the name of the flow that you want to invoke using this flow reference.

doc:name

Customize to display a unique name for the component in your application.

Note: Attribute not required in Mule Standalone configuration.


    
            
         
1
<flow-ref name="helloworldFlow2" doc:name="Flow Reference"/>

See Also

  • Read more about the different kinds of Flows and Subflows that you can call using a flow reference component.

In this topic: