Implementation
Introduction
This module implements features for configure, manage an execute diferents orchestration flows.
createProcessInstance
This method create a new instance for an Orchestrator definition and associate it to an object.
Parameters
- processName: The name of an existing Orchestrator Definition
- recordId: The id of an Object.
- startOnCreation: If true, the flow will evaluate on start. If false, the Orchestrator instance will wait for an input event.
evaluate
This method evaluate the conditions in an Orchestrator Instance and execute the nexts steps if the conditions are meetings.
Parameters
- recordId: The id of and object.
- If the object exists, and no other parameters are passed to the method, it will evaluate all the Orchestrator Instances associates to this record.
- If the Process name is filled, the method will evaluate all the Orchestrator Instances associates to this record but only the ones created from the Process name.
- If the Command is filled, the method will evaluate all the Orchestrator Instances associates to this record but only the steps associated to this command.
- processName: An Orchestrator Name
- command: A string that represent a command in the Orchestrator Instance
- processInstanceId: The Id of an Orchestrator Instance.
- If filled, and no other paramater is filled, the system will evaluate all the steps of the Orchestrator Instance.
- If filled and command parameter if filled too, the system will evaluate only the stepas related to the command.
- If filled and stepId parameter if filled too, the system will evaluate only the steps referenced in the call.
- stepId: a stepId of the processId.
generateNewVersion
This method generate a new Orchestrator Instance based in a Orchestrator Definition.
Parameter
- processDefinitionId: The id of the Orchestrator Definition
changeVersionStatus
This methods activate a new version of an Orchestrator Definition. This method also inactivate previos versions if they are actives
Parameters
- processDefinitionId: The Orchestrator definition to activate
- activateVersion: Boolean that indicate if the version must be activated.
save
This method is used to store the modification in an Orchestrator Definition.
Parameters
- processId: The id of the Orchestrator Definition
- definitionMap: The changes made on the Orchestrator Definition
loadDesignerContext
This method retrieve the information about an Orchestrator Defintion to be represented in the UI.
Parameters
- recordId: The id of the Orchestrator Definition
getActionGlobals
This methods look for all the actions that can be called in an Orchestrator. This methods return a map with all the callables apex in the system, all the flows invocables in the Orchestrator, all the Platform events in the system
createOrchestratorInstance
Invocable Method that receives an Orchestrator Instance name and the Record Id and creates the Orchestrator Instance
getOwnerFields
This method return all the available values for ownership.
execute
Executes the action using the provided input parameters. All orchestrator actios must implement it.
Parameters:
inputs: A Map<String, Object> containing the required inputs for the action. All orchestrator actios must implement it.
getDefinition
Retrieves the definition metadata for the action. This includes attributes such as the action name, label, description, category, and icon. All orchestrator actios must implement it.
getInputs
Retrieves the list of input definitions for the action. These definitions specify the required parameters and their configurations. All orchestrator actios must implement it.
getOutputs
Retrieves the list of output definitions for the action. These definitions describe the data returned by the action. All orchestrator actios must implement it.