ClickLink API Developer's Reference

ffirule.IntegrationRuleEngine

global with sharing class IntegrationRuleEngine implements IIntegrationRuleEngine, Schedulable, Database.Batchable, Process.Plugin

Helper class for running ClickLink rules.
This class is intended to be invoked as demonstrated in the ClickLink code samples. Developers should instead use ffirule.RuleService to run rules via the ClickLink API.

Properties

Name Type Description
Button IntegrationRule Used internally.
Job IntegrationRule Used internally.
Rule Integration Used internally.
SourceRecordIds List<ID> Used internally.
SourceSOQL String Used internally.

Methods

IntegrationRuleEngine

global IntegrationRuleEngine()

Constructor used internally to run a ClickLink Rule.

IntegrationRuleEngine

global IntegrationRuleEngine(ffirule__IntegrationRuleButton__c button, List<ID> sourceRecordIds)

Constructor used internally to run a ClickLink Rule.

Input Parameters

Name Type Description
button ffirule__IntegrationRuleButton__c The ClickLink Button for the ClickLink Rule.
sourceRecordIds List<ID> The IDs of the source records to be processed.

IntegrationRuleEngine

global IntegrationRuleEngine(ffirule__IntegrationRuleJob__c job)

Constructor used internally to run a ClickLink Rule.

Input Parameters

Name Type Description
job ffirule__IntegrationRuleJob__c The ClickLink Job for the ClickLink Rule.

IntegrationRuleEngine

global IntegrationRuleEngine(ApexPages.StandardSetController standardSetController)

Extension controller constructor.

Input Parameters

Name Type Description
standardSetController ApexPages.StandardSetController Native controller, supplied by the Salesforce platform.

IntegrationRuleEngine

global IntegrationRuleEngine(ApexPages.StandardController standardController)

Extension controller constructor.

Input Parameters

Name Type Description
standardController ApexPages.StandardController Native controller, supplied by the Salesforce platform.

getEngine

global ffirule.IntegrationRuleEngine getEngine()

Initialises the Integration Rule component when used as an extension controller.

execute

global void execute(SchedulableContext ctx)

Implementation for Schedulable interface.

Input Parameters

Name Type Description
ctx SchedulableContext Native schedulable context, supplied by the Salesforce platform.

start

global Database.QueryLocator start(Database.BatchableContext ctx)

Implementation for Database.Batchable interface.

Input Parameters

Name Type Description
ctx Database.BatchableContext Native batchable context, supplied by the Salesforce platform.

execute

global void execute(Database.BatchableContext ctx, List<sObject> sourceRecords)

Implementation for Database.Batchable interface.

Input Parameters

Name Type Description
ctx Database.BatchableContext Native batchable context, supplied by the Salesforce platform.
sourceRecords List<sObject> A subset of the source records to process, supplied by the Salesforce platform.

finish

global void finish(Database.BatchableContext ctx)

Implementation for Database.Batchable interface.

Input Parameters

Name Type Description
ctx Database.BatchableContext Native batchable context, supplied by the Salesforce platform.

invoke

global Process.PluginResult invoke(Process.PluginRequest request)

Implementation for Process.Plugin interface.

Input Parameters

Name Type Description
request Process.PluginRequest Native request, supplied by the Salesforce platform.

describe

global Process.PluginDescribeResult describe()

Implementation for Process.Plugin interface.

convert

global PageReference convert()

Runs the ClickLink Rule configured for this ffirule.IntegrationRuleEngine instance.

triggerHandler

global static void triggerHandler()

Trigger logic implementation to synchronize source and target records following DML operations.

exportAsJSON

Deprecated: Use the Export button on ClickLink Rules List View instead.

global static String exportAsJSON(String integrationRuleName)

Exports a ClickLink Rule.

importFromJSON

Deprecated: Use the Import button on ClickLink Rules List View instead.

global static void importFromJSON(String integrationRuleJSON)

Imports a ClickLink Rule.

getRunningApexJobs

global static Set<Id> getRunningApexJobs(Set<ID> apexJobIds)

Determines which Apex Jobs are currently running.

Input Parameters

Name Type Description
apexJobIds Set<ID> The IDs of Apex Jobs to check.

Return Value

A subset of the supplied Apex Job IDs; the IDs of currently running Apex Jobs.