Exam MCD - Level 1 All QuestionsBrowse all questions from this exam
Question 142

Refer to the exhibits. In the color flow, both the variable named color and the payload are set to “red”.

An HTTP POST requests then sent to the decideColor flow's HTTP Listener.

What is the payload value at the Logger component after the HTTP Request completes?

    Correct Answer: C

    In the color flow, the variable named 'color' and the payload are both set to 'red'. However, when an HTTP POST request is sent to the decideColor flow's HTTP Listener, it operates independently and does not have access to the variables of the parent flow due to the scope of variables being limited to the flow in which they are defined, and not passed via HTTP request. In the decideColor flow, since the color variable is not passed and thus considered null, the payload is set to 'white' based on the condition in the decideColor flow. Therefore, the payload value at the Logger component after the HTTP Request completes is 'white'.

Discussion
DarisOption: C

Answer is C - White. Variable scope is within Parent flow only except when using a flow reference.

n0maeOption: C

I tried. Answer is C.

Neo_0000Option: C

C is the correct answer.

[Removed]Option: D

Wouldnt an error be thrown since its trying to access a variable that it cant?

aiden_03Option: C

Answer is C - Variables are not accessible through HTTP request

aook002Option: C

- Vars.color is set to ‘Red’ in color flow. - decideColor flow is called using HTTP Post (Be aware of variable scope - note not a Flow Reference) - This means vars are not passed from color flow to decideColor flow. - When decideColor flow is run, it has no idea of the value of the color variable. - Therefore, as color variable is null. Payload response set to ‘White’. For Alandt's answer, if it were a Flow Reference the answer would be B as the variable scope of color would be visible to child flow. But is incorrect as it is a HTTP POST request.

Alandt

You are totally correct. Thanks for mentioning. Ignore my other comment guys.

AlandtOption: B

- In the "color" flow, both the variable named "color" and the payload are set to "red". - When the HTTP POST request is made to the "decideColor" flow, the "color" variable is not null (it's set to "red"). Thus, the payload value set in the "decideColor" flow will be "blue". So, the payload value at the Logger component after the HTTP Request completes will be: B. “blue”

Alandt

My answer is wrong above. Ignore it. Correct answer is C

marcop1Option: C

Answer is C

ExamDevOption: C

Agree with Daris. Correct answer is C - White. Variable scope is within Parent flow only except when using a flow reference.

RanjansinghOption: A

A - red, the child flow is the http request and in parent flow payload remain same