curl --request POST \
--url http://{host}:{port}/{contextPath}/task/{id}/complete \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"variables": {
"aVariable": {
"value": "aStringValue"
},
"anotherVariable": {
"value": 42
},
"aThirdVariable": {
"value": true
}
},
"withVariablesInReturn": true
}
'
{
"aVariable": {
"value": "aStringValue"
},
"anotherVariable": {
"value": 42
},
"aThirdVariable": {
"value": true
}
}
任务
完成
Completes a task and updates process variables.
POST
/
task
/
{id}
/
complete
curl --request POST \
--url http://{host}:{port}/{contextPath}/task/{id}/complete \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"variables": {
"aVariable": {
"value": "aStringValue"
},
"anotherVariable": {
"value": 42
},
"aThirdVariable": {
"value": true
}
},
"withVariablesInReturn": true
}
'
{
"aVariable": {
"value": "aStringValue"
},
"anotherVariable": {
"value": 42
},
"aThirdVariable": {
"value": true
}
}
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.