QUESTION, ANSWER, EXPLANATION
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.
RELATED ARTICLES
OTHER ARTICLES
OLDER ARTICLES
LATEST FORUM UPDATES
APIAmeeth, Thursday, 1.9.2022 / 21:23
Jay-Catalyst, Tuesday, 2.11.2021 / 10:48
Matteo, Friday, 3.7.2020 / 16:30
Matteo, Friday, 3.7.2020 / 16:29
Matteo, Friday, 3.7.2020 / 16:28
Caio S Cavalcante, Friday, 22.5.2020 / 16:59
Edo Schatz, Thursday, 21.5.2020 / 13:50
Edo Schatz, Thursday, 21.5.2020 / 11:29
Edo Schatz, Wednesday, 20.5.2020 / 18:18
Edo Schatz, Monday, 18.5.2020 / 16:33
NEW ARTICLES
POPULAR ARTICLES