Exam Integration-Architect Topic 6 Question 41 Discussion
Actual exam question for Salesforce's Integration-Architect exam
Question #: 41
Topic #: 6
Question #: 41
Topic #: 6
A company that is a leading provider of courses and training delivers courses using third party trainers. The trainer for the company has to be verified from 10 different training accreditation verification agencies before providing training for the company. Each training accreditation agency has its own response time, which could take days to confirm a trainer.
The company decided to automate the trainer accreditation verification process by integrating to the agencies' web services.
What is the recommended approach to automate this process?
The company decided to automate the trainer accreditation verification process by integrating to the agencies' web services.
What is the recommended approach to automate this process?
Suggested Answer: D Vote an answer
Explanation
Answer D is valid because using middleware to handle the call out to the 10 different verification services is a scalable and reliable solution that can handle the complexity and variability of the integration. The middleware can orchestrate the calls to the different web services, consolidate the verification results, and handle any errors or retries. The middleware can then make a call-in to Salesforce and update the verification status to "verified" using an API or a platform event12 Answer A is not valid because using Salesforce external service to make the call out to the 10 different verification services is not a feasible or efficient solution. Salesforce external service is a feature that allows invoking an external service from a flow and mapping its inputs and outputs to flow variables.
However, this feature requires configuring an Apex action, a named credential, and an external service definition for each web service, which is not a low code solution. Moreover, this feature does not support checking the verification agencies until the result is verified, as it only invokes the external service once per flow interview3 Answer B is not valid because creating a trigger on the trainer record to make a callout to each verification agency is not a recommended or robust solution. Triggers are Apex code that execute before or after database events, such as insert, update, or delete. However, triggers cannot make callouts directly, as they are part of a database transaction and must complete quickly. To make a callout from a trigger, an asynchronous process such as a future method or a queueable job must be used, which adds complexity and overhead to the integration. Moreover, triggers have limits on the number of callouts and asynchronous calls they can make per transaction, which may affect the scalability and reliability of the integration.
Answer C is not valid because making an Apex callout using @future annotation to make the call out to all different agencies is not a suitable or reliable solution. The @future annotation allows marking a method for execution at a later time when system resources become available. However, this annotation has several limitations and drawbacks, such as:
Future methods cannot return values, so they cannot update the trainer status to "verified" directly.
Future methods have limits on the number of callouts and future calls they can make per execution, which may affect the scalability and reliability of the integration.
Future methods run in their own thread and do not share any static variables or state with other methods, which makes it difficult to consolidate the verification results from different agencies.
Future methods are not guaranteed to execute at a specific time or order, which may affect the timeliness and accuracy of the integration.
1: Orchestration Pattern 2: Remote Process Invocation-Request and Reply 3: External Services : Apex Developer Guide: Triggers : Apex Developer Guide: Using Future Methods
Answer D is valid because using middleware to handle the call out to the 10 different verification services is a scalable and reliable solution that can handle the complexity and variability of the integration. The middleware can orchestrate the calls to the different web services, consolidate the verification results, and handle any errors or retries. The middleware can then make a call-in to Salesforce and update the verification status to "verified" using an API or a platform event12 Answer A is not valid because using Salesforce external service to make the call out to the 10 different verification services is not a feasible or efficient solution. Salesforce external service is a feature that allows invoking an external service from a flow and mapping its inputs and outputs to flow variables.
However, this feature requires configuring an Apex action, a named credential, and an external service definition for each web service, which is not a low code solution. Moreover, this feature does not support checking the verification agencies until the result is verified, as it only invokes the external service once per flow interview3 Answer B is not valid because creating a trigger on the trainer record to make a callout to each verification agency is not a recommended or robust solution. Triggers are Apex code that execute before or after database events, such as insert, update, or delete. However, triggers cannot make callouts directly, as they are part of a database transaction and must complete quickly. To make a callout from a trigger, an asynchronous process such as a future method or a queueable job must be used, which adds complexity and overhead to the integration. Moreover, triggers have limits on the number of callouts and asynchronous calls they can make per transaction, which may affect the scalability and reliability of the integration.
Answer C is not valid because making an Apex callout using @future annotation to make the call out to all different agencies is not a suitable or reliable solution. The @future annotation allows marking a method for execution at a later time when system resources become available. However, this annotation has several limitations and drawbacks, such as:
Future methods cannot return values, so they cannot update the trainer status to "verified" directly.
Future methods have limits on the number of callouts and future calls they can make per execution, which may affect the scalability and reliability of the integration.
Future methods run in their own thread and do not share any static variables or state with other methods, which makes it difficult to consolidate the verification results from different agencies.
Future methods are not guaranteed to execute at a specific time or order, which may affect the timeliness and accuracy of the integration.
1: Orchestration Pattern 2: Remote Process Invocation-Request and Reply 3: External Services : Apex Developer Guide: Triggers : Apex Developer Guide: Using Future Methods
by Aldrich at Jan 11, 2024, 07:38 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).