Newer Version Available

This content describes an older version of this product. View Latest

Plugin Interface

Allows you to pass data between your organization and a specified flow.

Namespace

Process

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. After you implement the interface on a class, the class can be referenced only from flows.
  • The annotation supports all data types and bulk operations. After you implement the annotation on a class, the class can be referenced from flows, processes, and the Custom Invocable Actions REST API endpoint.
  • Legacy Apex actions aren’t supported in auto-layout in Flow Builder. Legacy Apex actions are only available to be added in free-form in Flow Builder. Existing actions can be edited in both auto-layout and free-form mode.

Tip

Plugin Methods

The following are instance methods for Plugin.

describe()

Returns a Process.PluginDescribeResult object that describes this method call.

Signature

public Process.PluginDescribeResult describe()

Return Value

Type: Process.PluginDescribeResult

invoke(request)

Primary method that the system invokes when the class that implements the interface is instantiated.

Signature

public Process.PluginResult invoke(Process.PluginRequest request)

Parameters

request
Type: Process.PluginRequest

Return Value

Type: Process.PluginResult

Plugin Example Implementation

Test Class

The following is a test class for the above class.