flowable/flowable-engine · error · FlowableIllegalArgumentException
The identity link type is required.
Error message
The identity link type is required.
What it means
The identity link body must include a non-null "type" (the identity link type, e.g. 'participant', 'owner', or a custom type). If RestIdentityLink.type is null, FlowableIllegalArgumentException("The identity link type is required.") is thrown.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceIdentityLinkCollectionResource.java:84
@ApiResponse(code = 400, message = "Indicates the requested body did not contain a userId or a type."),
@ApiResponse(code = 404, message = "Indicates the requested case instance was not found.")
})
@PostMapping(value = "/cmmn-runtime/case-instances/{caseInstanceId}/identitylinks", produces = "application/json")
@ResponseStatus(HttpStatus.CREATED)
public RestIdentityLink createIdentityLink(@ApiParam(name = "caseInstanceId") @PathVariable String caseInstanceId, @RequestBody RestIdentityLink identityLink) {
CaseInstance caseInstance = getCaseInstanceFromRequestWithoutAccessCheck(caseInstanceId);
if (identityLink.getGroup() == null && identityLink.getUser() == null) {
throw new FlowableIllegalArgumentException("User or group are required.");
}
if (StringUtils.isEmpty(identityLink.getGroup()) && StringUtils.isEmpty(identityLink.getUser())) {
throw new FlowableIllegalArgumentException("Only one value of user or group is supported.");
}
if (identityLink.getType() == null) {
throw new FlowableIllegalArgumentException("The identity link type is required.");
}
if (restApiInterceptor != null) {
restApiInterceptor.createCaseInstanceIdentityLink(caseInstance, identityLink);
}
if (StringUtils.isNotEmpty(identityLink.getGroup())) {
runtimeService.addGroupIdentityLink(caseInstance.getId(), identityLink.getGroup(), identityLink.getType());
} else {
runtimeService.addUserIdentityLink(caseInstance.getId(), identityLink.getUser(), identityLink.getType());
}
return restResponseFactory.createRestIdentityLink(identityLink.getType(), identityLink.getUser(), identityLink.getGroup(), null, null, caseInstance.getId());
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Add "type" to the request body, e.g. "participant".
- Use a known identity link type supported for case instances.
- Validate that identityLink.type != null before calling the endpoint.
Example fix
// before
{"user": "kermit"}
// after
{"user": "kermit", "type": "participant"} Defensive patterns
Strategy: validation
Validate before calling
// Java
if (link.getType() == null || link.getType().isEmpty()) {
throw new IllegalArgumentException("identity link type is required");
} Prevention
- Always set type (e.g. participant) on identity link payloads
- Do not rely on server-side defaults — none exist
- Keep shared client models in sync with RestIdentityLink
When it happens
Trigger: POST /cmmn-runtime/case-instances/{id}/identitylinks with {"user":"kermit"} and no "type" field.
Common situations: Client forgetting the type field; assuming the server defaults the type (it does not); schema drift after upgrading the REST API client model.
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
- User or group are required.
- Variable operation is missing for variable: ${variable.getNa
- Variable value is missing for variable: ${variable.getName()
- 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/7df3ae114234a53b.
Report an issue: GitHub.