flowable/flowable-engine · error · FlowableIllegalArgumentException
An assignee is required when delegating a task.
Error message
An assignee is required when delegating a task.
What it means
Delegating a task requires a target assignee; the delegate action reads 'assignee' from the action request and throws FlowableIllegalArgumentException (HTTP 400) when it is null. Delegation without a receiver is meaningless to the engine.
Solutions
- Include "assignee":"<userId>" in the action request body.
- Validate the assignee field in the client before dispatching the delegate action.
- If no assignee exists, use action 'claim' or 'complete' instead of delegate.
- Resolve a fallback assignee (e.g. group lead) when the selected user is null.
Example fix
// before
{"action":"delegate"}
// after
{"action":"delegate","assignee":"kermit"} Defensive patterns
Strategy: validation
Validate before calling
if (!body.assignee) throw new Error('assignee is required for the delegate action'); Type guard
const canDelegate = (req) => typeof req.assignee === 'string' && req.assignee.length > 0;
Try / catch
try { await api.post(`/cmmn-runtime/tasks/${id}`, {action:'delegate', assignee}); } catch (e) { if (e.response && e.response.status === 400) { /* prompt for an assignee */ } throw e; } Prevention
- Require assignee selection in the UI before allowing delegate
- Default to a fallback assignee when none is chosen
- Validate action-specific required fields in a shared request builder
When it happens
Trigger: POST /cmmn-runtime/tasks/{taskId} with action 'delegate' but no assignee field in the request body.
Common situations: UI forms that allow submitting delegate without selecting a user; copy-pasted claim/complete payloads lacking assignee; client code path where assignee resolution returned null.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- No variable name was found in request body.
- Transient variable name is required
- Variable name is required
- Variable operation is missing for variable
- A group or a user is required to create an identity link.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/946c9215dab1316d.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/task/TaskResource.java:247
taskCompletionBuilder.transientVariable(var.getName(), actualVariableValue);
}
}
}
taskCompletionBuilder
.taskId(task.getId())
.formDefinitionId(actionRequest.getFormDefinitionId())
.outcome(actionRequest.getOutcome())
.complete();
}
protected void resolveTask(Task task, TaskActionRequest actionRequest) {
taskService.resolveTask(task.getId());
}
protected void delegateTask(Task task, TaskActionRequest actionRequest) {
if (actionRequest.getAssignee() == null) {
throw new FlowableIllegalArgumentException("An assignee is required when delegating a task.");
}
taskService.delegateTask(task.getId(), actionRequest.getAssignee());
}
protected void claimTask(Task task, TaskActionRequest actionRequest) {
// In case the task is already claimed, a
// FlowableTaskAlreadyClaimedException is thrown and converted to
// a CONFLICT response by the ExceptionHandlerAdvice
taskService.claim(task.getId(), actionRequest.getAssignee());
}
protected void unclaimTask(Task task) {
taskService.unclaim(task.getId());
}
}
View on GitHub (pinned to d6d39ce1c6)