Refer to the exhibits.
What DataWeave expression transforms the conductorIds array to the XML output?
A. 1. 1. trains:
2. 2. conductorIds map ((engId, index) ->
3. 3. train: {
4. 4. engineerId: engId
5. 5. }
6. 6. )
B. 1. 1. { trains:
2. 2.
3. 3. conductorIds map ((engId, index) ->
4. 4. train: {
5. 5. engineerId: engId
6. 6. }
7. 7. )
8. 8. }
C. 1. 1. trains:
2. 2. {(
3. 3. conductorIds map ((engId, index) ->
4. 4. train: {
5. 5. engineerId: engId
6. 6. }
7. 7. )
8. 8. )}
D. 1. 1. {( trains:
2. 2.
3. 3. conductorIds map ((engId, index) ->
4. 4. train: {
5. 5. engineerId: engId
6. 6. }
7. 7. )
8. 8. )}
Explanation:
Points to remember:
* XML must have a root element.
* XML only allows one root element
* To avoid multiple root issues, you must create a root element for the XML output, whenever we transform output
* When mapping array elements (JSON or JAVA) to XML, wrap the map operations in {(..)}
-{ } are defining the object
( ) are transforming each element in the array as a key/value pair
* The transformation to XML would fail if the above mentioned considerations were not taken into account.
* Thus the transformation script declares a root element as trains and wraps the data in “{(
)}“.
Whenever you see such type of question, always look out for root element followed by {( )} wrapping map.
I call this a "Wrap The Map" scenario. Hope it would help you remember !
Refer to the exhibit.
The main flow contains a Flow Reference for the child flow.
What values are accessible in the child flow after a web client submits a request to http://localhost:8Q81/order? color=red?
A. payload
B. payload quantity var
C. payload color query param
D. payload quantity var color query param
Explanation:
Flow Reference Component
Flow Reference routes the Mule event to another flow or subflow, executes all processors in the referenced flow, and then routes the event back within the same Mule application. The following diagram shows the order of processing when one flow references another:
When the main flow is triggered, the Mule event travels through and executes the flow until the event reaches the Flow Reference. The event then travels through and executes the referenced flow from beginning to end, and then returns to the main flow.
This process enables you to treat the entire referenced flow like a single component in your current flow.
Refer to the exhibit.
A. Option A
B. Option B
C. Option C
D. Option D
Refer to the exhibits.
The Set Payload transformer's value is set to {'year': '2020'}.
What message value should be added to the Logger component to output the message 'The year is 2020', without hardcoding 2020?
A. '#[The year is $(pay load .year)]*
B. The year is #[payload.year]'
C. '#[The year is " + paytoad.year]'
D. #["The year is "++ payload.year].
Which out of below is not an asset?
A. Template
B. Connector
C. Exchange
D. Example
Explanation:
Page 14 out of 47 Pages |
Previous |