Which statement best describes the behavior of a flow variable when a parent flow invokes a child flow via a flow reference?

Prepare for the MuleSoft Associate Exam. Study with quizzes featuring flashcards and multiple choice questions, complete with hints and explanations. Ace your certification with confidence!

Multiple Choice

Which statement best describes the behavior of a flow variable when a parent flow invokes a child flow via a flow reference?

Explanation:
Flow variables represent per-message state that travels with the message as it moves through flows. When a parent flow calls a child flow with a flow reference, the same message, and thus the same flow variable map, is available to the child. If the child reads or writes a flow variable, those changes affect the same variable seen by the parent once control returns. That’s why the variable is accessible in the child and changes propagate back to the parent. It isn’t immutable, it isn’t hidden from the child, and it isn’t reset to null in the child.

Flow variables represent per-message state that travels with the message as it moves through flows. When a parent flow calls a child flow with a flow reference, the same message, and thus the same flow variable map, is available to the child. If the child reads or writes a flow variable, those changes affect the same variable seen by the parent once control returns. That’s why the variable is accessible in the child and changes propagate back to the parent. It isn’t immutable, it isn’t hidden from the child, and it isn’t reset to null in the child.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy