Toggle menu

Workflow Processes

The workflow engine is designed to coordinate services involving tasks, decisions, timers and automated processes. Data is stored in a process instance using Process Variables, which can be updated in active processes as the workflow progresses.

Form data from form submissions that are part of the process (ie forms that start process and forms that complete user tasks) is stored in process variables.

When a process instance ends the final values of any variables are saved. Data is moved from the active database tables to the completed tables, where it will stay until it is deleted. There's a Scheduled Tasks in iCM that deletes completed processes that are, by default, over a year old.

Process instances should be considered transient and temporary. They should not be used for long term storage or reporting. For long term storage, use the History service.

Example Process Data

The data in the workflow database tables is visible in the process modeller and can be queried using the Workflow Worker API.

As well as the data stored in process variables, it also includes information about who started the process, the process definition, and dates and times the instance started and ended.

For example using the getHistoricProcessInstances function to query a process instance would return something similar to:

{
    "startUserId": "timg",
    "startTime": "2022-05-10T13:03:49Z",
    "endTime": "2022-05-10T13:04:49Z",
    "businessKey": "0717-6739-1689-9689",
    "processDefinitionName": "Example Process",
    "processDefinitionId": "exampleprocess:6:255004",
    "processVariables": {
        "_historyLabels": {
            "labela": "Example Process",
            "labelc": null,
            "labelb": "0717-6739-1689-9689",
            "labeld": null,
            "labele": null
        },
        "_businessKey": "0717-6739-1689-9689",
        "_taskForm": "COMPLETEEXAMPLEPROCESS",
        "_startDate": "2022-05-10T13:03:49Z",
        "_startForm": "STARTEXAMPLEPROCESS",
        "_startPageURL": "https://docs.gossinteractive.com/1234",
        "_startFormDescription": "Start the Example Process",
        "_taskFormDescription": "Complete the Example Process",
        "_staff-response-1_claimed": {
            "taskId": "255033",
            "time": "2022-05-10T13:04:13Z",
            "user": "timadmin",
            "proxyUser": ""
        },
        "_staff-response-1_completed": {
            "taskId": "255033",
            "time": "2022-05-10T13:04:48Z",
            "user": "timadmin",
            "proxyUser": ""
        },
        "form_NAME": "Tim",
        "form_EMAIL": "support@gossinteractive.com",
        "form_QUERY": "When is my parcel going to be delivered?",
        "form_RESPONSE": "It's been shipped and should be with you on Tuesday afternoon",
        "initiator": "timg"
    }
}

This is the process data for the same process instance that generated the example history in the History Service example.

The form_ process variables hold the values of the form fields used to start the process and complete tasks. Like history, these process variables could contain any value that a user submitted via a form.

Process variables also store the IDs of any users who have interacted with the process.

Process instance and task data is also indexed by the platform's search engine. The search index is kept up to date (or deleted) as process instances are updated.

Last modified on 16 June 2022

Share this page

Facebook icon Twitter icon email icon

Print

print icon