Contact Us 1-800-596-4880

Flow Ref 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 will 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.

Configuration

STUDIO Visua Editor

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

    Studio_FlowRef_canvas
  2. Open the flow reference component’s properties pane to configure it according to the table below.

    Studio+flow+reference+properties
Attribute Value Description

Display Name

Flow Reference

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

Flow name

Mule will auto-populate 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.

XML Editor or Standalone

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.

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