Loading
Ongoing maintenance for Salesforce HelpRead More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Callable Implementations

          Callable Implementations

          Vlocity Apex classes and the Remote Actions of Omniscripts and Integration Procedures support the Callable interface.

          Although the VlocityOpenInterface and VlocityOpenInterface2 interfaces enable flexible implementations with a uniform signature, they reside in the Vlocity managed package and aren't truly Salesforce standards. However, classes that implement VlocityOpenInterface or VlocityOpenInterface2 also implement the Callable Interface, which is a Salesforce standard.

          In addition, Remote Actions of Omniscripts and Integration Procedures can invoke any class that implements Callable, regardless of whether it implements VlocityOpenInterface or VlocityOpenInterface2. You specify the Remote Class, Remote Method, and Additional Input properties in the same way for classes that implement any of these interfaces.

          To change custom classes that implement VlocityOpenInterface or VlocityOpenInterface2 to Callable implementations, convert the signature with a few lines of code:

          global with sharing class ClassName implements Callable
          {
              public Object call(String action, Map<String, Object> args) {
          
                  Map<String, Object> input = (Map<String, Object>)args.get('input');
                  Map<String, Object> output = (Map<String, Object>)args.get('output');
                  Map<String, Object> options = (Map<String, Object>)args.get('options');
          
                  return invokeMethod(action, input, output, options);
              }
              private Object invokeMethod(String methodName, Map<String, Object> inputMap, Map<String, Object> outMap, Map<String, Object> options) {
                  ...
              }
              ...
          }

          For a full example, see Make a Long-Running Remote Call Using Omnistudio.OmniContinuation.

           
          Loading
          Salesforce Help | Article