Using the Process.PluginResult Class

The Process.PluginResult class returns output parameters from the class that implements the interface to the flow.
Tip

Tip

We recommend using the @InvocableMethod annotation instead of the Process.Plugin interface.

  • The interface doesn’t support Blob, Collection, sObject, and Time data types, and it doesn’t support bulk operations. Once you implement the interface on a class, the class can be referenced only from flows.
  • The annotation supports all data types and bulk operations. Once you implement the annotation on a class, the class can be referenced from flows, processes, and the Custom Invocable Actions REST API endpoint.

You can instantiate the Process.PluginResult class using one of the following formats:

Use the map when you have more than one result or when you don't know how many results will be returned.

The following is an example of instantiating a Process.PluginResult class.
        string url = 'https://docs.google.com/document/edit?id=abc';
        String status = 'Success';
        Map<String,Object> result = new Map<String,Object>();
        result.put('url', url);
        result.put('status',status);
        new Process.PluginResult(result);