Process Context
Process context plays a significant role in managing digital processes. Learn the details.
The process context is an important part of the Orchestration Engine system as it holds all the external information regarding the processing of a specific digital process version.
A process context is a JSON object that consists of three primary sections:
Context: contains all the event-types received during the digital process run, their associated payloads (if any), and the initial payload when the digital process is started.
Metadata: provides additional information about the process context, such as the tenant identifier.
Status: represents the current status of the process context.
Here's an example of a process context in JSON format.
Context
The context section holds all the event types received during the digital process run and the payload associated with each of them, if any. It also contains the initial payload when the digital process is started. The following keys are present in the context section:
executionTemplateID
: The unique identifier for the digital process.executionTemplateVersionID
: The unique identifier for the specific version of the digital process.instanceid
: The unique identifier for the instance of the digital process run.processid
: A unique identifier for the workflow. It combines the tenant ID, digital process name, digital process version ID, and an additional unique identifier.
Event types are keys within the context
object that represent specific events that occurred during the digital process run. Each event type may have an associated payload.
In the example provided, product_assigned_discount_category
is an event type with the payload:
This means that when the digital process run received a product_assigned_discount_category
event, the event carried the payload with the discount_category
set to vip.
Metadata
The metadata
section provides additional information about the process context. The example contains the tenantkey
, which represents the unique identifier for the tenant associated with the process context. You can also see the createdAt
and updatedAt
fields with timestamps - you can check when the process context for a given digital process instance was created and updated.
Status
The status
section indicates the current status of the process context. The statuses that are valid for the process context, are either Started or Finished. In the provided example, the status
is finished, meaning the digital process run has been completed. If the digital process run is completed and the process context status if finished, we can no longer write to this process context.
The process context is a critical component in the system that enables tracking and managing the processing of the digital process versions. Understanding its structure and the information it holds, developers and users can effectively interact with it and monitor it as well.
Last updated
Was this helpful?