Free Salesforce-MuleSoft-Developer-I Exam Braindumps (page: 11)

Page 10 of 59

A web client submits a request to http://localhost:8081?flrstName=john.
What is the correct DataWeave expression to access the firstName parameter?

  1. #[attributes.queryParams.firstName]
  2. #[message.queryParams.hrstName]
  3. #[message.inboundProperties.'http.query.params'.firstName]
  4. #[attributes.'http.query.params'.firstName]

Answer(s): A



By default, what happens to a file after it is read using an FTP connector Read operation?

  1. The file is deleted from the folder
  2. The file is moved to a different folder
  3. The file stays in the same folder unchanged
  4. The file is renamed in the same folder

Answer(s): C

Explanation:

File is not updated when FTP read operations is performed. Reference:
https://docs.mulesoft.com/file-connector/1.3/file-read



Refer to the exhibits.





The Validation component in the Try scope throws an error.
What response message is returned to a client request to the main flow's HTTP Listener? The Validation component in the Try scope throws an error.
What response message is returned to a client request to the main flow's HTTP Listener?

  1. Success - main flow
  2. Error - main flow
  3. Error - Try scope
  4. Validation Error

Answer(s): A

Explanation:

Note that private flow has error scope defined as On Error Continue . So when error occurs in private flow , it is handled by this On Error Continue scope which sends success response back to main flow and does not throw back an error. So main continues normally and payload is set to Success - main flow.
Hence correct answer is Success - main flow
1) HTTP listener received request
2) The Flow Reference calls the child flow
3) The Is Number validator creates an Error Object because the payload isn't an integer. Child Flow execution stops
#[error.description] = "payload is not a valid INTEGER value" #[error.errorType] = VALIDATION:INVALID_NUMBER

4) The On Error Continue handles the errorThe payload is set to "Error ­ Sub Flow"
5) "Error ­ Sub Flow" is returned to the main flow as if the child flow was a success. The Set Payload is executed. The payload is reset to "Success ­ Finished Main Flow"
6) "Success ­ Main Flow" is returned to the requestor in the body of the HTTP request. HTTP Status Code: 200
As you can see, in the above example, because the error was caught by an On Error Continue scope in the child flow (RED in, GREEN out) when the Mule Message returns to the parent flow, the parent flow knows none-the-different that there was a failure because the on error continue returns a 200 success message. Note that because, to the mainFlow, the childFlow appeared to succeed, the processing of mainFlow resumed after the flow reference.



Refer to the exhibit.



What is a valid expression for the Choice router's when expression to route events to the documenticShipping flow?

  1. 0#[ payload = 'US' ]
  2. #[ payload == 'US' J
  3. #[ if(payload = 'US') J
  4. #[ if(payload == "US") ]

Answer(s): B

Explanation:

Choice Router
The Choice router dynamically routes messages through a flow according to a set of DataWeave expressions that evaluate message content. Each expression is associated with a different routing option. The effect is to add conditional processing to a flow, similar to an if/then/else code block in most programming languages.
Only one of the routes in the Choice router executes, meaning that the first expression that evaluates to true triggers that route's execution and the others are not checked. If none of the expressions are true, then the default route executes.

Properties of <when>
PropertyDescription
Expression (expression)
Expression in DataWeave language to evaluate input.
If the expression evaluates to true, this routing option is used:
<when expression="#[vars.language == 'Spanish']" >

Mulesoft Doc Ref : https://docs.mulesoft.com/mule-runtime/4.3/choice-router-concept With respect to above information ,
Option 1 is the correct syntax as others are incorrect because of below reasons
* Single = is not the correct syntax to validate the condition. It should be ==
* If keyword is not required in when condition.






Post your Comments and Discuss Salesforce Salesforce-MuleSoft-Developer-I exam with other Community members:

Salesforce-MuleSoft-Developer-I Exam Discussions & Posts