curl --request POST \
--url http://{host}:{port}/{contextPath}/task/{id}/submit-form \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"variables": {
"aVariable": {
"value": "aStringValue"
},
"anotherVariable": {
"value": 42
},
"aThirdVariable": {
"value": true
},
"aFileVariable": {
"value": "TG9yZW0gaXBzdW0=",
"type": "File",
"valueInfo": {
"filename": "myFile.txt"
}
}
}
}
'{
"aVariable": {
"value": "aStringValue",
"type": "String",
"valueInfo": {}
},
"anotherVariable": {
"value": 42,
"type": "Integer",
"valueInfo": {}
},
"aThirdVariable": {
"value": true,
"type": "Boolean",
"valueInfo": {}
}
}任务
提交表单
Completes a task and updates process variables using a form submit. There are two
difference between this method and the complete method:
- If the task is in state
PENDING- i.e., has been delegated before, it is not completed but resolved. Otherwise it will be completed. - If the task has Form Field Metadata defined, the process engine will perform backend validation for any form fields which have validators defined. See the Generated Task Forms section of the User Guide for more information.
POST
/
task
/
{id}
/
submit-form
curl --request POST \
--url http://{host}:{port}/{contextPath}/task/{id}/submit-form \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"variables": {
"aVariable": {
"value": "aStringValue"
},
"anotherVariable": {
"value": 42
},
"aThirdVariable": {
"value": true
},
"aFileVariable": {
"value": "TG9yZW0gaXBzdW0=",
"type": "File",
"valueInfo": {
"filename": "myFile.txt"
}
}
}
}
'{
"aVariable": {
"value": "aStringValue",
"type": "String",
"valueInfo": {}
},
"anotherVariable": {
"value": 42,
"type": "Integer",
"valueInfo": {}
},
"aThirdVariable": {
"value": true,
"type": "Boolean",
"valueInfo": {}
}
}Authorizations
Body
application/json
Indicates whether the response should contain the process variables or not. The
default is false with a response code of 204. If set to true the response
contains the process variables and has a response code of 200. If the task is not
associated with a process instance (e.g. if it's part of a case instance) no
variables will be returned.