Salesforce Certified Platform Integration Architect Practice Questions

Salesforce Certified Platform Integration Architect exam preparation

Salesforce Certified Platform Integration Architect practice questions in English: 180 questions with explanations. The mock exam has 60 questions and 105 minutes.

Salesforce Certified Platform Integration Architect free question 8 / 10 · Domain 5: Build Solution

A page-initiated callout to a slow remote service risks piling up long-running transactions in the org. Which mitigations does the Request and Reply pattern list in its Timeliness sidebar?

  1. Raise the callout timeout to 120 seconds on the call, and move the callout into a trigger so it runs after the page is saved
  2. Turn the callout into an outbound message, and keep the page waiting until the message has been acknowledged by the service
  3. Set the external callout timeout to five seconds, and use a continuation for long-running transactions in Visualforce or Lightning
  4. Remove the timeout from the callout, and let the Apex governor limits end the request when the service is too slow
Show the answer and explanation

Answer: C

Why this is correct
The Timeliness sidebar of Request and Reply notes that Salesforce has a configurable timeout of up to 120 seconds for calls from Apex, and that external calls are subject to Apex synchronous transaction governor limits. It advises mitigating the risk of instantiating more than 10 transactions that run for more than five seconds each. Two options are setting the timeout of the external callout to five seconds and using a continuation in Visualforce or Lightning components to handle long-running transactions.

Why the other options are wrong
"Raise the callout timeout to 120 seconds on the call, and move the callout into a trigger so it runs after the page is saved" … A trigger callout is rated suboptimal for this pattern, and a long timeout adds to the long-running transaction problem.
"Turn the callout into an outbound message, and keep the page waiting until the message has been acknowledged by the service" … Outbound messaging belongs to fire and forget and is not meant to hold a page waiting. It does not address the timeout risk of this pattern.
"Remove the timeout from the callout, and let the Apex governor limits end the request when the service is too slow" … Dropping the timeout makes slow calls last longer. The pattern recommends a short timeout or a continuation.

Key points
Pick a timeout that fits the user’s patience, and use a continuation when the remote service cannot meet it.

Go to the Salesforce Certified Platform Integration Architect practice app (10 free questions; purchase unlocks all questions)

See the full practice set