Brief description of how an approval process is handled by salesforce in the backend, where this information is stored.
Use this object to read the description of an approval process. The definition is read-only.
We can not modify the record created in ProcessDefinition Object.
But we can describe, query, search and retrieve the approval processes information.
The records are created when we create a new approval process using the Salesforce user interface of the Approval Process.
An instance of a single, end-to-end approval chain. ProcessInstance record is created every time for a particular object record which is submitted for approval. It is also a read-only object. We can describe, query, and retrieve the approval processes Instance.
All ProcessInstance fields are automatically populated once the record is submitted for approval, with two exception fields: CompletedDate and LastActorId that are populated only after the approval process instance is complete.
The ProcessDefinitionId field is the reference or foreign key ID of the ProcessDefinition Object.
History of changes to a process instance. It’s neither searchable nor queryable & this is the read-only object which shows all steps and pending approval requests associated with an approval process (ProcessInstance). But we can use this object to replicate the related list functionality.
We can query ProcessInstanceHistory by querying it in a nested soql query on the parent ProcessInstance object. The nested soql query references StepsAndWorkitems, which is the child relationship name for ProcessInstanceHistory in the ProcessInstance object.
We can use ProcessInstanceHistory for a single read-only view of the both ProcessInstanceStep and ProcessInstanceWorkitem objects.
One step in an approval workflow process instance.
ProcessInstanceStep represents a step instance in an approval process (ProcessInstance) on which users has already acted.
A pending approval request to a specific user.
ProcessInstanceWorkItem represents a step instance in an approval process(ProcessInstance) on which is pending and users has to perform some action next on it.
We can describe, query, and retrieve the approval processes steps and workItems.
#ProcessDefinition #ProcessInstance #ProcessInstanceHistory #ProcessInstanceStep #ProcessInstanceWorkitem #ApprovalProcess