FoMS Experts

News / Exam Questions

QUESTION, ANSWER, EXPLANATION

Exam Question MS-21-029 for MuleSoft Certified Developer (MCD) - Level 1

Exam Question MS-21-029 for MuleSoft Certified Developer (MCD) - Level 1
Share
FacebookGoogle plusLinkedInStumbleuponTwitter
FoMS12.4.2021

This question has been asked by one of our members and a similar question could most likely be on the exam. All answers have been verified by MuleSoft certified FoMS experts.

Question

A flow needs to combine and return data from two different data sources. It contains a Database SELECT operation followed by an HTTP Request operation. What is the method to capture both payloads so the payload from the second request does not overwrite that from the first?

Answer

A) Put the Database SELECT operation inside a Cache scope
B) Put the Database SELECT operation inside a Message Enricher scope
C) Nothing, previous payloads are combined into the next payload
D) Save the payload from the Database SELECT operation to a variable

The correct answer to this question is D.

Explanation

The Database SELECT operation is going to store its result in the payload. The HTTP Request operation is going to store its response in the payload as well. To avoid overwriting the payload, before making the HTTP Request we have to store the content of the payload into a variable.

That way, after the HTTP Request operation, we will have return data from two different data sources (variable and payload) and we can use "Transform Message" to combine those two sets of data into one.

Register now