Method

POST

POST /process-definition/key/{key}/start (starts the latest version of the process definition which belongs to no tenant)

POST /process-definition/key/{key}/tenant-id/{tenant-id}/start (starts the latest version of the process definition for tenant)

Parameters

A JSON object with the following properties: (at least an empty JSON object {} or an empty request body)

Name Description
Name Description
——-
variables A JSON object containing the variables the process is to be initialized with. Each key corresponds to a variable name and each value to a variable value. A variable value is a JSON object with the following properties:
NameDescription
valueThe variable's value. For variables of type Object, the serialized value has to be submitted as a String value.
For variables of type File the value has to be submitted as Base64 encoded string.
typeThe value type of the variable.
valueInfo A JSON object containing additional, value-type-dependent properties.
For serialized variables of type Object, the following properties can be provided:

- objectTypeName: A string representation of the object's type name.
- serializationDataFormat: The serialization format used to store the variable.
For serialized variables of type File, the following properties can be provided:

- filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.
- mimetype: The MIME type of the file that is being uploaded.
- encoding: The encoding of the file that is being uploaded.
The following property can be provided for all value types:

- transient: Indicates whether the variable should be transient or not. See documentation for more informations.

|value|The variable's value. For variables of type Object, the serialized value has to be submitted as a String value.
For variables of type File the value has to be submitted as Base64 encoded string.
|type|The value type of the variable.|valueInfo| A JSON object containing additional, value-type-dependent properties.
For serialized variables of type Object, the following properties can be provided:

  • objectTypeName: A string representation of the object's type name.
  • serializationDataFormat: The serialization format used to store the variable.
    For serialized variables of type File, the following properties can be provided:

  • filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.

  • mimetype: The MIME type of the file that is being uploaded.
  • encoding: The encoding of the file that is being uploaded.
    The following property can be provided for all value types:

  • transient: Indicates whether the variable should be transient or not. See for more informations.
    |Name|Description
    |——-
    |value|The variable's value. For variables of type Object, the serialized value has to be submitted as a String value.
    For variables of type File the value has to be submitted as Base64 encoded string.

|type|The value type of the variable.
|valueInfo| A JSON object containing additional, value-type-dependent properties.
For serialized variables of type Object, the following properties can be provided:

  • objectTypeName: A string representation of the object's type name.
  • serializationDataFormat: The serialization format used to store the variable.
    For serialized variables of type File, the following properties can be provided:

  • filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.

  • mimetype: The MIME type of the file that is being uploaded.
  • encoding: The encoding of the file that is being uploaded.
    The following property can be provided for all value types:

  • transient: Indicates whether the variable should be transient or not. See documentation for more informations.
    |businessKey|The business key the process instance is to be initialized with. The business key uniquely identifies the process instance in the context of the given process definition.
    |caseInstanceId|The case instance id the process instance is to be initialized with.
    |Name|Description
    |——-
    |startInstructions|Optional. A JSON array of instructions that specify which activities to start the process instance at. If this property is omitted, the process instance starts at its default blank start event.
    The instructions are executed in the order they are in. An instruction may have the following properties:


|type|Mandatory. One of the following values: startBeforeActivity, startAfterActivity, startTransition. A startBeforeActivity instruction requests to start execution before entering a given activity. A startAfterActivity instruction requests to start at the single outgoing sequence flow of a given activity. A startTransition instruction requests to execute a specific sequence flow.|activityId|Can be used with instructions of types startBeforeActivity and startAfterActivity. Specifies the activity the instruction targets.|transitionId|Can be used with instructions of types startTransition. Specifies the sequence flow to start.|variables|
Can be used with instructions of type startBeforeActivity, startAfterActivity, and startTransition. A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object.

NameDescription
valueThe variable's value. For variables of type Object, the serialized value has to be submitted as a String value.
For variables of type File the value has to be submitted as Base64 encoded string.
typeThe value type of the variable.
valueInfo A JSON object containing additional, value-type-dependent properties.
For serialized variables of type Object, the following properties can be provided:

- objectTypeName: A string representation of the object's type name.
- serializationDataFormat: The serialization format used to store the variable.
For serialized variables of type File, the following properties can be provided:

- filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.
- mimetype: The MIME type of the file that is being uploaded.
- encoding: The encoding of the file that is being uploaded.
The following property can be provided for all value types:

- transient: Indicates whether the variable should be transient or not. See for more informations.
localIndicates whether the variable should be a local variable or not. If set to true, the variable becomes a local variable of the execution entering the target activity.

|value|The variable's value. For variables of type , the serialized value has to be submitted as a String value.
For variables of type File the value has to be submitted as Base64 encoded string.
|type|The value type of the variable.|valueInfo| A JSON object containing additional, value-type-dependent properties.
For serialized variables of type Object, the following properties can be provided:

  • objectTypeName: A string representation of the object's type name.
  • filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.

  • mimetype: The MIME type of the file that is being uploaded.
  • encoding: The encoding of the file that is being uploaded.
    The following property can be provided for all value types:

  • transient: Indicates whether the variable should be transient or not. See documentation for more informations.|local|Indicates whether the variable should be a local variable or not. If set to true, the variable becomes a local variable of the execution entering the target activity.
    |type|Mandatory. One of the following values: startBeforeActivity, startAfterActivity, startTransition. A startBeforeActivity instruction requests to start execution before entering a given activity. A startAfterActivity instruction requests to start at the single outgoing sequence flow of a given activity. A startTransition instruction requests to execute a specific sequence flow.
    |activityId|Can be used with instructions of types startBeforeActivity and startAfterActivity. Specifies the activity the instruction targets.
    |transitionId|Can be used with instructions of types startTransition. Specifies the sequence flow to start.
    |Name|Description
    |——-
    |variables|
    Can be used with instructions of type startBeforeActivity, startAfterActivity, and startTransition. A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object.

|value|The variable's value. For variables of type Object, the serialized value has to be submitted as a String value.
For variables of type File the value has to be submitted as Base64 encoded string.
|type|The value type of the variable.|valueInfo| A JSON object containing additional, value-type-dependent properties.
For serialized variables of type Object, the following properties can be provided:

  • objectTypeName: A string representation of the object's type name.
  • serializationDataFormat: The serialization format used to store the variable.
    For serialized variables of type File, the following properties can be provided:

  • filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.

  • mimetype: The MIME type of the file that is being uploaded.
  • transient: Indicates whether the variable should be transient or not. See for more informations.|local|Indicates whether the variable should be a local variable or not. If set to true, the variable becomes a local variable of the execution entering the target activity.
    |Name|Description
    |——-
    |value|The variable's value. For variables of type Object, the serialized value has to be submitted as a String value.
    For variables of type File the value has to be submitted as Base64 encoded string.

|type|The value type of the variable.
|valueInfo| A JSON object containing additional, value-type-dependent properties.
For serialized variables of type Object, the following properties can be provided:

  • objectTypeName: A string representation of the object's type name.
  • serializationDataFormat: The serialization format used to store the variable.
    For serialized variables of type File, the following properties can be provided:

  • filename: The name of the file. This is not the variable name but the name that will be used when downloading the file again.

  • mimetype: The MIME type of the file that is being uploaded.
  • encoding: The encoding of the file that is being uploaded.
    The following property can be provided for all value types:

  • transient: Indicates whether the variable should be transient or not. See documentation for more informations.
    |local|Indicates whether the variable should be a local variable or not. If set to true, the variable becomes a local variable of the execution entering the target activity.
    |skipCustomListeners| Skip execution listener invocation for activities that are started or ended as part of this request.
    Note: This option is currently only respected when start instructions are submitted via the startInstructions property.

|skipIoMappings| Skip execution of for activities that are started or ended as part of this request.
Note: This option is currently only respected when start instructions are submitted via the startInstructions property.

|withVariablesInReturn| Indicates if the variables, which was used by the process instance during execution, should be returned. Default value: false

Result

A JSON object representing the newly created process instance.Properties are:

Name Value Description
id String The id of the process instance.
definitionId String The id of the process definition.
businessKey String The business key of the process instance.
caseInstanceId String The case instance id of the process instance.
tenantId String The tenant id of the process instance.
ended Boolean A flag indicating whether the instance is still running or not.
suspended Boolean A flag indicating whether the instance is suspended or not.
links Object A JSON array containing links to interact with the instance.
Name Value Description
——-
variables Object A JSON object containing a property for each of the latest variables. The key is the variable name, the value is a JSON object of serialized variable values with the following properties:

NameValueDescription
valueString / Number / Boolean / Object The variable's value.
typeStringThe value type of the variable.
valueInfoObject A JSON object containing additional, value-type-dependent properties.
For variables of type Object, the following properties are returned:
  • objectTypeName: A string representation of the object's type name.
  • serializationDataFormat: The serialization format used to store the variable.
    The following property can be returned for all value types:

  • transient: exposed if the value is set to true. See for more informations.


|value|String / Number / Boolean / Object| The variable's value. |type|String|The value type of the variable.|valueInfo|Object| A JSON object containing additional, value-type-dependent properties.
For variables of type Object, the following properties are returned:

  • objectTypeName: A string representation of the object's type name.

  • serializationDataFormat: The serialization format used to store the variable.
    The following property can be returned for all value types:

  • transient: exposed if the value is set to true. See documentation for more informations.
    |Name|Value|Description
    |——-
    |value|String / Number / Boolean / Object| The variable's value.
    |type|String|The value type of the variable.
    |valueInfo|Object| A JSON object containing additional, value-type-dependent properties.
    For variables of type Object, the following properties are returned:

  • objectTypeName: A string representation of the object's type name.

  • serializationDataFormat: The serialization format used to store the variable.
    The following property can be returned for all value types:

  • transient: exposed if the value is set to true. See for more informations.

  • Response Codes

    Example

    POST /process-definition/aProcessDefinitionId/start

    POST /process-definition/key/aProcessDefinitionKey/start

    Request body:

    Response

    1. {
    2. "links": [
    3. {
    4. "method": "GET",
    5. "href":"http://localhost:8080/rest-test/process-instance/anId",
    6. "rel":"self"
    7. }
    8. ],
    9. "id":"anId",
    10. "definitionId":"aProcessDefinitionId",
    11. "businessKey":"myBusinessKey",
    12. "ended":false,
    13. "suspended":false
    14. }

    POST /process-definition/aProcessDefinitionId/start

    POST /process-definition/key/aProcessDefinitionKey/start

    Request body:

    Response

    1. {
    2. "links": [
    3. {
    4. "method": "GET",
    5. "href": "http://localhost:8080/rest-test/process-instance/aProcInstId",
    6. "rel": "self"
    7. ],
    8. "id": "aProcInstId",
    9. "definitionId": "aProcessDefinitionId",
    10. "businessKey": "myBusinessKey",
    11. "ended": false,
    12. "suspended": false,
    13. "tenantId": null,
    14. "variables": {
    15. "anotherVariable": {
    16. "type": "Boolean",
    17. "value": true,
    18. "valueInfo": {
    19. "transient" : true
    20. }
    21. },
    22. "aVariable": {
    23. "type": "String",
    24. "value": "aStringValue",
    25. "valueInfo": { }
    26. }
    27. }
    28. }

    POST /process-definition/aProcessDefinitionId/start

    POST /process-definition/key/aProcessDefinitionKey/start

    Response

    1. {
    2. "links": [
    3. {
    4. "method": "GET",
    5. "href":"http://localhost:8080/rest-test/process-instance/anId",
    6. "rel":"self"
    7. }
    8. ],
    9. "id":"anId",
    10. "definitionId":"aProcessDefinitionId",
    11. "businessKey":"myBusinessKey",
    12. "tenantId":null,
    13. "ended":false,
    14. }