mcd-level-1 question 203 discussion

View all MuleSoft Certified Developer - Level 1 (Mule 4) Exam here
back to mulesoft forum

Question 203

Refer to the exhibits. In the color flow , both the variable named color and payload are set to "red".
An HTTP POST request is then sent to the decideColor flow's HTTP Listener.
What is the payload value at the Logger component after the HTTP request completes?



A. white
B. red
C. blue
D. Error message

Answer:

C


Explanation:
Correct answer is white.
Key thing to note here is that variables are not available to the called flow when it is invoked using
HTTP request.
So the flow goes like below
1) Color variable is set to red
2) Payload is set to red
3) Child flow is called using HTTP request which means variables are not available in called flow (They
would have been if flow reference activity would have been used)
4) Hence set payload activity will set payload to white as color variable is null
5) Payload returned in main flow is white.
6) So finally output of logger is white

Discussions
0 / 1000
d.abbas
11 months ago

There is no reference from the child flow to the parent flow, hence the variable being 'null'

d.abbas
11 months ago

Thanks for submitting , your comment will be approved soon by our moderators