Flow variable defined in a parent Mule flow, when the parent calls a child flow using a flow reference, what is the scope and behavior of that variable in the child flow?

Study for the MuleSoft Associate / Development Fundamental Test. Master key concepts with flashcards and multiple choice questions, complete with hints and explanations. Prepare thoroughly for your exam!

Multiple Choice

Flow variable defined in a parent Mule flow, when the parent calls a child flow using a flow reference, what is the scope and behavior of that variable in the child flow?

Explanation:
Flow variables live on the message and are part of the same message context used across a flow invocation. When the parent flow calls a child flow with a flow reference, the child flow runs in the same message context, so the flow variable defined in the parent is visible inside the child, can be read and modified, and those changes persist back in the parent when control returns. This shared, mutable behavior lets you communicate state between flows without passing separate copies. If you need true isolation, you’d copy the value or store it elsewhere, but by default it’s accessible and mutable across the parent and child.

Flow variables live on the message and are part of the same message context used across a flow invocation. When the parent flow calls a child flow with a flow reference, the child flow runs in the same message context, so the flow variable defined in the parent is visible inside the child, can be read and modified, and those changes persist back in the parent when control returns. This shared, mutable behavior lets you communicate state between flows without passing separate copies. If you need true isolation, you’d copy the value or store it elsewhere, but by default it’s accessible and mutable across the parent and child.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy