Salesforce Certified MuleSoft Developer Practice Questions

Salesforce Certified MuleSoft Developer exam preparationAligned with the official Exam Guide (Spring '24 release; guide version 13)

Salesforce Certified MuleSoft Developer practice questions in English: 180 questions with explanations. The mock exam has 60 questions and 120 minutes.

Salesforce Certified MuleSoft Developer free question 8 / 10 · Domain 7: Processing Records

An HTTP Listener starts a flow whose Batch Job processes the request body. Inside a Batch Step, a Logger writes #[attributes.queryParams.region] for each record, expecting the region query parameter of the original request. What do the batch processing pages say about this expression?

  1. It stops the deployment, because the batch namespace rejects attributes inside Batch Steps
  2. It logs the region, as each record keeps the attributes of the message that started the job
  3. It logs the region in the first Batch Step, and later Batch Steps see the attributes as null
  4. Records cannot reach the attributes of the Batch Job input; in a step attributes return null
Show the answer and explanation

Answer: D

Why this is correct
Each record in a batch job instance is similar to a Mule event: processors reach the record with payload and work on Mule variables with vars. The Architecture section of the batch overview adds the exception: they cannot access or modify Mule attributes from the input to the Batch Job component. The Batch Component Reference says the same from the other side, that attributes are not accessible within the Batch Step and Batch Aggregator components and that both return null on attributes. The query parameters of the HTTP request are attributes of the message that reached the Batch Job, so the Logger in the step finds nothing there and the region is not logged.

Why the other options are wrong
"It logs the region, as each record keeps the attributes of the message that started the job" … Records do not carry the attributes. The overview says that processors in batch components cannot access or modify Mule attributes from the input to the Batch Job component.
"It logs the region in the first Batch Step, and later Batch Steps see the attributes as null" … There is no first-step exception. The reference says that within the Batch Step and Batch Aggregator components attributes are not accessible, and both components return null on attributes.
"It stops the deployment, because the batch namespace rejects attributes inside Batch Steps" … The reference describes what the expression gives at run time, null on attributes, not a rejection of the configuration when the application is deployed.

Records carry payload, not attributes
Anything that the records need from the request, such as a query parameter, has to be placed in the data that the job receives before the Batch Job, for example by a Transform Message that shapes the input.

Go to the Salesforce Certified MuleSoft Developer practice app (10 free questions; purchase unlocks all questions)

See the full practice set