Perform Action on Task
put
/bpm/api/4.0/tasks/{id}
Performs the action on a specific task identifier, based on the payload. The following actions are available and the actions depend on the application: APPROVE, REJECT, REASSIGN, DELEGATE, WITHDRAW, SUSPEND, RESUME, DELETE, PURGE, ACQUIRE, RELEASE, PUSHBACK, ERROR, ADHOC_ROUTE, INFO_REQUEST, INFO_SUBMIT, SKIP_CURRENT_ASSIGNMENT, SAVE and ESCALATE. Custom Actions depend on the task definition.
Request
Path Parameters
-
id(required): string
Task ID
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object-
action: object
action
-
comment: object
comment
-
comments: string
-
defaultActionForGroupVote: string
applicable only when routingType is Parallel
-
priority: integer
(int32)
-
routingAction: string
Only applicable for ADHOC_ROUTE. Accepts the custom action to be performed before routing the task.
-
routingType: string
Only applicable for ADHOC_ROUTE.Accepts the type of routing to be performed. Allowed values are Simple,Sequential and Parallel
-
votersPercentage: integer
applicable only when routingType is Parallel.Default value is 0
Nested Schema : Link
Type:
Show Source
object-
href(required): string
-
rel(required): string
Allowed Values:
[ "self", "cancel", "forceCancel", "hold", "release", "subscribe", "permissions", "executionStatus" ]
Response
Supported Media Types
- application/json
200 Response
Success . In case of PURGE, a title specifying task id successfully purged will be returned.
Root Schema : Task
Type:
Show Source
object-
artifacts: array
artifacts
-
contextId: string
-
final: boolean
Indicates whether the task update is the final update.
-
history: array
history
-
id: string
-
kind: string
Default Value:
task -
metadata: object
metadata
Additional Properties Allowed:
true -
status: object
TaskStatus
Nested Schema : metadata
Type:
objectAdditional Properties Allowed:
trueNested Schema : TaskStatus
Type:
Show Source
object-
message: object
Message
-
state: string
Allowed Values:
[ "submitted", "working", "input-required", "completed", "canceled", "failed", "unknown" ] -
timestamp: string
UTC timestamp string.
Nested Schema : Artifact
Type:
Show Source
object-
append: boolean
-
artifactId: string
-
description: string
-
lastChunk: boolean
-
metadata: object
metadata
Additional Properties Allowed:
true -
name: string
-
parts: array
parts
Nested Schema : metadata
Type:
objectAdditional Properties Allowed:
trueNested Schema : TextPart
Type:
Show Source
object-
kind: string
Default Value:
text -
metadata: object
metadata
Additional Properties Allowed:
true -
text: string
Text content.
-
type: string
Part type.Example:
text
Nested Schema : metadata
Type:
objectAdditional Properties Allowed:
trueNested Schema : Message
Type:
Show Source
object-
contextId: string
Conversation identifier. For `message/stream`, this must be nested under `params.message`.
-
kind: string
Default Value:
message -
messageId: string
-
metadata: object
metadata
Additional Properties Allowed:
true -
parts: array
parts
-
role: string
Allowed Values:
[ "user", "agent" ] -
taskId: string
Optional task identifier used for resumed or task-associated message flows.
Nested Schema : metadata
Type:
objectAdditional Properties Allowed:
true400 Response
The tasknumber is invalid.No action will be performed.
401 Response
Unauthorized
404 Response
Task not found.
409 Response
Conflict.
500 Response
Internal Server Error