ポイントツーポイント統合の一環として、開発者は外部 Web サービスを呼び出す必要がありますが、要求が高いため、応答を返すまでに長い時間がかかります。リクエストの一部として、開発者はコールアウトを行う前にエンド ユーザーから主要な入力を収集する必要があります。開発者がこれらのビジネス要件を実装するために使用すべき 2 つの要素はどれですか?
2 つの答えを選択してください
正解:A,B
To implement the business requirements, the developer should use a Lightning web component and an Apex method that returns a Continuation object. A Lightning web component is a custom HTML element that can be used to create user interfaces for Salesforce apps. A Lightning web component can collect key inputs from the end user using various input components, such as lightning-input, lightning-combobox, or lightning-radio-group. A Lightning web component can also invoke an Apex method using the @wire decorator or the imperative Apex syntax. A Continuation object is a special Apex object that allows the developer to make a long-running request to an external web service and receive the response asynchronously. A Continuation object can specify the callback method, the timeout, and the request parameters for the callout. A Continuation object can also return a unique ID that can be used to reference the callout in the Lightning web component. To use a Continuation object, the developer should create and return a Continuation object in the Apex method that makes the callout, and annotate the method with @AuraEnabled(cacheable=true). The developer should also create and annotate another Apex method that acts as the callback method, and handles the response from the external web service. The developer should then invoke the Apex method that returns the Continuation object from the Lightning web component, and use the Continuation ID to track the status of the callout. The developer should also handle the callback event from the Apex method that acts as the callback method, and display the response data in the Lightning web component. Using a Screen Flow would not be effective, as a Screen Flow is a declarative tool that allows the developer to create guided, interactive processes for users, but it does not support making callouts to external web services. Using Process Builder would not be effective, as Process Builder is a declarative tool that allows the developer to automate business processes based on criteria and actions, but it does not support making callouts to external web services. Reference: [Lightning Web Components Basics], [Continuation Class]