Skip to main content
Version: 8.6

Create process instance

POST 

/process-instances

Creates and starts an instance of the specified process. The process definition to use to create the instance can be specified either using its unique key (as returned by Deploy resources), or using the BPMN process ID and a version.

Waits for the completion of the process instance before returning a result when awaitCompletion is enabled.

Request

Body

required
    oneOf
    processDefinitionKey int64

    The unique key identifying the process definition, e.g. returned for a process in the deploy resources endpoint. Cannot be used together with processDefinitionId.

    variables object

    JSON object that will instantiate the variables for the root variable scope of the process instance.

    property name* any

    Additional properties allowed.

    tenantId string

    The tenant ID of the process definition.

    operationReference int64

    Possible values: >= 1

    A reference key chosen by the user that will be part of all records resulting from this operation. Must be >0 if provided.

    startInstructions object[]

    List of start instructions. By default, the process instance will start at the start event. If provided, the process instance will apply start instructions after it has been created.

  • Array [
  • elementId string

    Future extensions might include:

    • different types of start instructions
    • ability to set local variables for different flow scopes

    For now, however, the start instruction is implicitly a "startBeforeElement" instruction

  • ]
  • awaitCompletion boolean

    Default value: false

    Wait for the process instance to complete. If the process instance completion does not occur within the requestTimeout, the request will be closed. Disabled by default.

    fetchVariables string[]

    List of variables names to be included in the response. If empty, all visible variables in the root scope will be returned.

    requestTimeout int64

    Timeout (in ms) the request waits for the process to complete. By default or when set to 0, the generic request timeout configured in the cluster is applied.

Responses

The process instance was created.

Schema
    processDefinitionKey int64

    The key of the process definition which was used to create the process instance.

    processDefinitionId string

    The BPMN process ID of the process definition which was used to create the process. instance

    processDefinitionVersion int32

    The version of the process definition which was used to create the process instance.

    processInstanceKey int64

    The unique identifier of the created process instance; to be used wherever a request needs a process instance key (e.g. CancelProcessInstanceRequest).

    tenantId string

    The tenant ID of the created process instance.

    variables object

    All the variables visible in the root scope.

    property name* any

    Additional properties allowed.

Loading...