Submit Start Form
Starts a process instance using a set of process variables and the business key. If the start event has Form Field Metadata defined, the process engine will perform backend validation for any form fields which have validators defined. See Documentation on Generated Task Forms.
Method
POST /process-definition/{id}/submit-form
POST /process-definition/key/{key}/submit-form
(starts the latest version of the process definition which belongs to no tenant)
POST /process-definition/key/{key}/tenant-id/{tenant-id}/submit-form
(starts the latest version of the process definition for tenant)
Parameters
Path Parameters
Name | Description |
---|---|
id | The id of the process definition to submit the form for. |
key | The key of the process definition (the latest version thereof) to be retrieved. |
tenant-id | The id of the tenant the process definition belongs to. |
Request Body
A JSON object with the following properties:
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:
| ||||||||
business key | A JSON object containing the business key the process is to be initialized with. The business key uniquely identifies the process instance in the context of the given process definition. |
Result
This method returns no content.
Response Codes
Code | Media type | Description |
---|---|---|
204 | Request successful. | |
400 | application/json | The variable value or type is invalid, for example if the value could not be parsed to an Integer value or the passed variable type is not supported. See the Introduction for the error response format. |
404 | application/json | Process definition with given key does not exist. See the Introduction for the error response format. |
500 | application/json | The instance could not be created successfully. See the Introduction for the error response format. |
Example
Request
POST /process-definition/aProcessDefinitionId/submit-form
POST /process-definition/key/aProcessDefinitionKey/submit-form
Request Body:
{"variables":
{"aVariable" : {"value" : "aStringValue", "type": "String"},
"anotherVariable" : {"value" : true, "type": "Boolean"}},
"businessKey" : "myBusinessKey"
}
Response
{"links":[{"method": "GET", "href":"http://localhost:8080/rest-test/process-instance/anId","rel":"self"}],
"id":"anId",
"definitionId":"aProcessDefinitionId",
"businessKey":"myBusinessKey",
"ended":false,
"suspended":false}