SK SKYVVA Documentation

1. What is the InterfaceExecution Scheduler and when to use it?

**Learning Objectives:- **

This unit describes:-

Introduction:-

In this chapter, you will learn about the "Interface execution scheduler". The new scheduler "Interface Execution Scheduler" is only used with the outbound interface and is generated automatically for any outbound interface inside an integration. The scheduler uses the method invokeCallout2() to execute the outbound 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:-

Configuration For Case 1:-

Create Inbound Interface:-

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 Id,BillingCity,BillingCountry,Name,SAP_Sales_Org__c FROM Account.

Check Result on Message Monitoring For Case 1 once InterfaceExecution scheduler processed:-

Configuration For Case 2:-

[aux_code language="javascript" theme="tomorrow" title="" extra_classes=""]Global with sharing class InterfaceCustomClass implements skyvvasolutions.CustomInterfaceObjectCallout { Global map getMapObject(){ map ActMap = new map([SELECT Id,BillingCity,BillingCountry,Name,SAP_Sales_Org__c FROM Account where BillingCity='PhnomPenh' AND SAP_Sales_Org__c ='']); system.debug(ActMap); return ActMap; } }[/aux_code]

  1. Fill the details as shown below in the picture.

Run the scheduler:-

Check Result on Message Monitoring For Case 2 once InterfaceExecution scheduler processed:-

Open this article in the interactive viewer →