flowable/flowable-engine · error · FlowableObjectNotFoundException
Could not find the requested identity link.
Error message
Could not find the requested identity link.
What it means
After validating the family/identity/type arguments, the resource scans the task's identity links for one matching user/group and type. If no such link exists, Flowable throws FlowableableObjectNotFoundException carrying IdentityLink.class, mapping to HTTP 404.
Solutions
- List existing links (GET /cmmn-runtime/tasks/{taskId}/identitylinks/{family}) to confirm the exact identityId and type before addressing one
- Correct the identityId or type spelling
- Handle 404 gracefully in the client (idempotent delete) instead of assuming the link always exists
Example fix
// before
restTemplate.delete("/cmmn-runtime/tasks/123/identitylinks/users/jonh/candidate"); // typo, 404
// after
List<RestIdentityLink> links = restTemplate.getForObject("/cmmn-runtime/tasks/123/identitylinks/users", List.class);
if (containsLink(links, "john", "candidate")) {
restTemplate.delete("/cmmn-runtime/tasks/123/identitylinks/users/john/candidate");
} Defensive patterns
Strategy: try-catch
Validate before calling
const links = await get(`/cmmn-runtime/tasks/${taskId}/identitylinks/${family}`);
const exists = links.some(l =>
(family === 'users' ? l.user : l.group) === identityId && l.type === type); Try / catch
try {
await del(`/cmmn-runtime/tasks/${taskId}/identitylinks/${family}/${identityId}/${type}`);
} catch (e) {
if (e.status === 404) {
return; // already gone: treat delete as idempotent
}
throw e;
} Prevention
- List current links before GET/DELETE on a specific one
- Handle 404 as an expected outcome for deletions
- Beware stale caches: re-fetch after concurrent modifications
When it happens
Trigger: GET or DELETE on /cmmn-runtime/tasks/{taskId}/identitylinks/{family}/{identityId}/{type} where the task exists but no link matches the given identityId+type combination.
Common situations: Stale client cache after another actor removed the link; typo in the user/group name or type; attempting to delete a link that was already removed; wrong task id.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- Could not find the requested identity link.
- A group or a user is required to create an identity link.
- ${aonfe.getMessage()}
- Batch part with id ' ' does not have a batch part document.
- Batch with id ' ' does not have a batch document.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/b426f4a93a8e9ddf.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/task/TaskIdentityLinkResource.java:125
protected IdentityLink getIdentityLink(String family, String identityId, String type, String taskId) {
boolean isUser = family.equals(CmmnRestUrls.SEGMENT_IDENTITYLINKS_FAMILY_USERS);
// Perhaps it would be better to offer getting a single identitylink
// from the API
List<IdentityLink> allLinks = taskService.getIdentityLinksForTask(taskId);
for (IdentityLink link : allLinks) {
boolean rightIdentity = false;
if (isUser) {
rightIdentity = identityId.equals(link.getUserId());
} else {
rightIdentity = identityId.equals(link.getGroupId());
}
if (rightIdentity && link.getType().equals(type)) {
return link;
}
}
throw new FlowableObjectNotFoundException("Could not find the requested identity link.", IdentityLink.class);
}
}
View on GitHub (pinned to d6d39ce1c6)