We have the interfaceExecution Scheduler which is a scheduler to execute the outbound interface. This scheduler is a scheduler per interface. But we need also the scheduler on different levels as per interface group and per integration. For the inbound interface we have scheduler such as batch, processing and reprocessing per these three different levels e.g.
- integration
- interface group
- interface
Interface Execution Scheduler? #
This scheduler is only used with the outbound interface and is generated automatically for any outbound interface inside an integration. It uses the SOQL in the field “SOQL Query for filter sObject”. In this field, the user can write the SOQL statement which filter sObject to be passed on the method invokeCallout2(). The scheduler uses the method invokeCallout2() to execute the outbound interface. If the SOQL is not powerful enough to solve the requirement of a customer then they can use apex class to write their own logic for data selection. Then the flag “Use Apex Class” has to be set and in the field “Apex Class for Filter sObject” an apex class has to be specified.
How to use it? #
We can see 2 Cases:-
Case 1:- Callout data to SAP with SOQL Query to filter sObject by using InterfaceExecution schedule processing.
Case 2:- CallOut data by using apex class for filter sObject.
Configuration for Interface Execution Scheduler:- #
Pre-Requisite:-
-
- Create Integration.
- Create SFDC2SAPPI Adapter.
- Create a Remote Site setting.
Configuration For Case 1:- #
Create Inbound Interface:- #
- Do Mapping as shown below and save it.
- In this inbound interface, we need to use the Id as the external Id. This Id is needed to update
the record id which was found by the filter query SOQL. If we don’t use the Id field of the
sObject it will not work.
Create Outbound Interface:- #
- Select Operation type- Query/ PullQuery.
- Processing mode- Asynchronous.
- Select Outbound Adapter.
- In Section “SOQL Query for filter sObject”
- Filter Query:- SELECT Id FROM Account WHERE BillingCity = ‘PhnomPenh’ AND SAP_Sales_Org__c =
- Interface to change condition:- Enter Inbound Interface ID.
- In section “SOQL Query to select sObject data” or by using “Query Editor” we can write the query:-
SELECT Id,BillingCity,BillingCountry,Name,SAP_Sales_Org__c FROM Account.
- Do Mapping as shown below.
- On the Integration, page Select the “Scheduler” tab.
- Check the section “Scheduler Per interface”.
- Run the “Interface execution Scheduler” as shown in the given picture below.
Check Result on Message Monitoring For Case 1 once InterfaceExecution scheduler processed:- #
Configuration For Case 2:- #
- Configuration for the inbound interface will be the same as case 1.
- Configuration for the outbound interface is given below.
- In Section “SOQL Query for filter sObject”
- Check the box of Use the apex class.
- Interface to change condition:- Enter Inbound Interface ID.
- Create a custom apex class with the code given below:-
Global with sharing class InterfaceCustomClass implements skyvvasolutions.CustomInterfaceObjectCallout {
Global map<Id, SObject> getMapObject(){
map<Id, Account> ActMap = new map<Id, Account>([SELECT Id,BillingCity,BillingCountry,Name,SAP_Sales_Org__c FROM Account where BillingCity=’PhnomPenh’ AND SAP_Sales_Org__c =”]);
system.debug(ActMap);
return ActMap;
}
}
5. Fill the details as shown belowin the picture.