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
- application/json
Body
required
- CreateProcessInstanceRequestByKey
- CreateProcessInstanceRequestById
- Array [
- different types of start instructions
- ability to set local variables for different flow scopes
- ]
- Array [
- different types of start instructions
- ability to set local variables for different flow scopes
- ]
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.
Additional properties allowed.
The tenant ID of the process definition.
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.
Future extensions might include:
For now, however, the start instruction is implicitly a "startBeforeElement" instruction
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.
List of variables names to be included in the response. If empty, all visible variables in the root scope will be returned.
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.
The BPMN process ID of the process definition to start an instance of. Cannot be used together with processDefinitionKey.
Default value: -1
The version of the process. Only considered when a processDefinitionId is provided. By default, the latest version of the process is used.
variables object
JSON object that will instantiate the variables for the root variable scope of the process instance.
Additional properties allowed.
The tenant ID of the process definition.
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.
Future extensions might include:
For now, however, the start instruction is implicitly a "startBeforeElement" instruction
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.
List of variables names to be included in the response. If empty, all visible variables in the root scope will be returned.
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
- 200
- 400
- 500
The process instance was created.
- application/json
- Schema
- Example (from schema)
Schema
The key of the process definition which was used to create the process instance.
The BPMN process ID of the process definition which was used to create the process. instance
The version of the process definition which was used to create the process instance.
The unique identifier of the created process instance; to be used wherever a request needs a process instance key (e.g. CancelProcessInstanceRequest).
The tenant ID of the created process instance.
variables object
All the variables visible in the root scope.
Additional properties allowed.
{
"processDefinitionKey": 0,
"processDefinitionId": "string",
"processDefinitionVersion": 0,
"processInstanceKey": 0,
"tenantId": "string",
"variables": {}
}
The provided data is not valid.
An internal error occurred while processing the request.
- application/problem+json
- Schema
- Example (from schema)
Schema
Default value: about:blank
A URI identifying the problem type.
A summary of the problem type.
Possible values: >= 400
and <= 600
The HTTP status code for this problem.
An explanation of the problem in more detail.
A URI identifying the origin of the problem.
{
"type": "about:blank",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}