HTTP task assignment binding
This binding supplements the MVP resource contract and BPMN profile. Browser sessions use the session binding.
An open task can require a role, a directly assigned account, or both. Task
representations include role only when a role is modeled, and include
assignee for a directly assigned account. A personal task has no claim or
release action. For a personal task that also requires a role, completion
requires the assigned account and its current role. Deactivation or removal
of that role prevents completion but does not change the personal assignment.
When an attempted process start reaches a personal task whose recipient is
missing, empty or unknown, the server responds with the problem type
invalid-task-recipient and HTTP 422. It does not create an instance. When
completion of an existing user task would reach such an assignment, the server
responds with the same problem type after persisting a problem on the existing
instance. The task completion and its resulting process changes are not
accepted. Repeated failures of that same task update the same open problem;
successful completion of that task clears its problem. Other open problems
are not cleared by it. The instance detail’s issues includes the affected
task and BPMN element, along with the most recent occurrence time.
If the error follows a service task, its external handler may already have had
an effect. The service attempt remains unknown and an instance problem
identifies the affected transition. The server does not automatically rerun
the handler. An explicit administrative service retry follows the existing
service-task contract and may execute the handler again.
Only the account identifier is used to resolve the target. It is not evidence of the caller’s identity or authority. Protected requests obtain their actor from the server session and enforce authorization on the server.
Worklist HTTP representation
GET /api/v1/worklist returns the tasks visible to the current session as an
items array and, when another page is available, an opaque nextCursor.
Clients can pass limit and cursor; the roleKey and instanceId filters
must stay the same when following a cursor. The list is a live view, ordered
by creation time with an identifier tie-breaker, rather than a snapshot.
Each summary includes id, instanceId, modelId, versionId,
bpmnElementId, state, createdAt, and an actions array. It includes
role and assignee when present. The actions are the server’s current
view for the signed-in account, not an authorization grant: every command
is authorized again when executed. A personal assignment has no claim or
release action.
POST /api/v1/tasks/{taskId}/claim and /release take no body, require the
current session and CSRF token, and return an updated task representation.
A concurrent state change can produce a 409 Problem Details response. The
client should inform the user and reload current state rather than blindly
retrying. Protected requests with an expired or missing session return 401;
a forbidden action or invalid CSRF token can return 403. The
session binding defines the origin and cookie requirements.
Task deadlines
An activation with a deadline includes dueAt as a UTC timestamp with
milliseconds. It is the earliest of the task’s own interrupting deadline
and the interrupting deadlines of its active enclosing scopes. An
Intermediate Timer Catch Event is a separate path. A non-interrupting
Boundary Timer schedules a reminder outside this Worklist deadline. Its
firing is visible in the instance’s reminderHistory. Claim, release,
role changes and a new input attempt retain the task’s deadline. The Worklist contains eligible open work. After a timer
interrupts a task, an authorized historical read shows state: "withdrawn",
the deadline and no available actions. The task detail has no
currentAttempt. Its previous attempt can be read by ID with state
withdrawn. A visible late mutation returns HTTP 409 with
task-withdrawn. A caller outside the task’s historical access scope
receives the usual task-not-found response.
The system withdrawn event carries taskId, activityId, at and the
prior attemptId when present. Timer-driven withdrawal records
boundaryEventId and the triggering timer’s dueAt. Terminate End Event
withdrawal records terminateEventId. A task opened by the outer
timeout flow receives deadlines from its own active scopes.
The processing timestamp at is the time observed for the committed
decision. If an attempted start or user task completion would activate a
task with an unrepresentable deadline, the server returns HTTP 422
task-deadline-out-of-range and rolls back the command.
Multi-instance review rounds
A review member includes multiInstance on the worklist and task
representations. Its roundId identifies the activation within the
process instance, index is the zero-based position in the input list,
and item is the local review item. The task ID identifies the
individual member. The existing role field gives the resolved role.
Both modes support a fixed role or a lookup by item. The current attempt
contains the local item and any shared task inputs.
Post the attempt ID and the local Boolean result to
POST /api/v1/tasks/{taskId}/complete. The task attempt, audit and round
state commit together. For a sequential round, the same commit opens
the next member when one remains. The final vote publishes the complete
result list in input order and advances the workflow. A relevant data
change returns 409 data-conflict and leaves that member open. After the
original inputs return, renew the attempt before submitting again.
GET /api/v1/worklist exposes only the currently open member of a
sequential round. If the enclosing scope interrupts it, its task leaves
the open list and a later completion receives 409 task-withdrawn.
Read recorded results through task attempts and history.
After 503 commit-unknown, read
GET /api/v1/tasks/{taskId}/attempts/{attemptId}. A completed attempt
shows the vote recorded in that transaction. An attempt that is still
current and open can be retried after checking current assignment and
inputs. Read instance detail and the open task list to see whether the
round has progressed. Keep the original task and attempt IDs for readback.