Skip to main content

Celonis Product Documentation

Process context

The process context is an important part of the Orchestration Engine system as it holds all the external information regarding the execution 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.

{
    "metadata": {
        "tenant": "01H7YP07GX9TFRK4S0RRGZ11WT",
        "createdAt": "2023-10-16T10:13:42.322Z",
        "updatedAt": "2023-10-16T10:14:09.354Z"
    },
    "context": {
        "executionTemplateID": "01HCD6ZYTDSBZ6KS1GNQYX529N",
        "executionTemplateVersionID": "01HCJ2VRN61N7J5WQSYQ9Z1JEZ",
        "instanceid": "691a4c2c-595b-4b3c-9cf3-0471f6e074c8",
        "metadata": {
            "externalID": "",
            "scenarioid": ""
        },
        "order.found": {
            "orderId": "EON1075"
        },
        "order.spotbuy.pending": {},
        "order.spotbuy.received": {
            "contact": {
                "companyId": "",
                "companyName": "",
                "id": "",
                "language": "en",
                "name": "",
                "value": ""
            },
            "contacts": [],
            "forms": [
                {
                    "metadata": {
                        "formId": "01HAPCT5KS0T7METVDM4GBM0MC",
                        "formName": "PO Form"
                    },
                    "payload": {
                        "businessNeed": "Spot Buy",
                        "expectedDeliveryDate": "2023-10-18T09:00:00.000Z",
                        "item": "30610403",
                        "itemCost": 112.79,
                        "orderDate": "2023-10-16T10:13:42.183Z",
                        "purchaseOrderNumber": "EON1075-30610403",
                        "purchaseSum": 360.928,
                        "quantity": 4,
                        "requesterName": "Emporix",
                        "requestorEmail": "oe@emporix.com",
                        "select": "pending"
                    }
                }
            ],
            "magicLinkId": "01HCVZM8QK3RNNJ14FG1WBBT92",
            "submission": 1
        },
        "processid": "01HCJ2VRN61N7J5WQSYQ9Z1JEZ-01H7YP07GX9TFBK2S0RRGZ11WY-01HCVZM98AP21QG53MEBRE9XVM"
    },
    "status": "finished"
}
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.

  • TemplateVersionID: 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:

{
    "discount_category": "vip"
}

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.

Status

Theffffffffff 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 execution of the digital process versions. By understanding its structure and the information it holds, developers and users can effectively interact with it and monitor it.