InvokeCallout3() method support SAP, SAP-PI, SAP-R/3, SFDC2SAPPI, SOAP, REST adapter types. The response could be a text of JSON, XML, List<Map<String,String>> based on given flag parameters in CallOutControl and Apex of each adapter handle setting when execute callout. InvokeCallout3() method support different mode:
1. SYNC
2. FUTURE
3. BATCH
4. AUTO
When to use Invoke callout3()?
When the integration follows the message type template for IStructure then we should use Invoke callout3() method. Only this method support the specific message type template.
Invoke Callout() | Invoke Callout2() | Invoke Callout3() |
There are different Parameter in each callout for each version. In Invoke callout() , there is only one parameter i,e Interface ID. | In Invoke callout2(), we pass two parameter interface Name and integration name . | In Invoke callout3() also, we pass two parameter interface Name and integration name . |
Invoke callout() doesn’t support queueable mode | Invoke callout2() supports all modes. | Invoke callout3() supports all modes. |
It doesn’t support message type template. | It doesn’t support message type template. | It supports message type template. |
Callout code: IServices.invokeCallout(‘InerfaceID’,new String[]{‘Enter AccountID’},’SYNC’); |
Callout code skyvvasolutions.CallOutControl c= new skyvvasolutions.CallOutControl(); c.returnxml=true; c.returnListRecord=true; c.iscreatemessage=true; List<String> lId = new List<String>(); for(Account a : [SELECT Id FROM Account]){ lId.add(a.Id); } |
Callout Code: skyvvasolutions.CallOutControl c= new skyvvasolutions.CallOutControl(); c.returnXml=true; c.returnListRecord=true; c.isCreateMessage=true; c.actionDoIntegrate=true; String[] ids=new String[]{‘0013N00000M22FbQAJ’}; skyvvasolutions.Iservices.invokeCalloutV3 (‘Von_Integration’,’SAP_PI_PO_Rest_Out’,ids,’SYNC’, c); |
#
Steps to use Invoke callout3() method: #
This usecase is showing with Rest adapter for outbound processing. SO we have to follow the rest template to create message type.
Step1:Create Rest adapter adapter .
Step2: Create message type for REST template
Manual create message type for REST template (google drive api)Manual create message type for REST template (google drive api)
Step 3: Create interface request(outbound) and interface response (inbound) , link interface inbound to outbound :Configuration on Interface using for google
How to Link response Interface:
Scroll the page to the Inbound/Outbound set up section. And select the response interface.
Link rest Adapter to Request interface
Mapping
- InvokeCallout3()
skyvvasolutions.CallOutControl c = new skyvvasolutions.CallOutControl();
c.returnJSONComplete=true;
c.actionDoIntegrate=true;
c.isCreateMessage=true;
String[] ids= new String[]{‘0011X00000TdIAXQA3′,’0011X00000TdIAYQA3′,’0011X00000TdIAZQA3’};
skyvvasolutions.Iservices.invokeCalloutV3(‘TEST-INTEGRATION’,’G