flowable/flowable-engine · error · FlowableObjectNotFoundException
Could not find the requested identity link.
Error message
Could not find the requested identity link.
What it means
Flowable REST throws FlowableObjectNotFoundException after scanning the process instance's identity links when no link matches the given identityId, family (users/groups), and type. The request was well-formed but the link does not exist on the process instance.
Solutions
- List current links via GET /runtime/process-instances/{id}/identitylinks and confirm the exact family/identityId/type triple before deleting.
- Handle HTTP 404 from this endpoint as a success case for idempotent deletes.
- Verify the link was created on the process instance (not on a task within it).
Example fix
// before
restTemplate.delete(url); // 404 crashes batch job
// after
try { restTemplate.delete(url); } catch (HttpClientErrorException.NotFound e) { /* already removed */ } Defensive patterns
Strategy: try-catch
Validate before calling
const links = await get(`/runtime/process-instances/${pid}/identitylinks`); if (!links.some(l => l.user === userId && l.type === type)) return null; Try / catch
try { del(url); } catch (e) { if (e.status === 404) return; throw e; } Prevention
- List identity links before delete
- Treat 404 as success in idempotent deletes
- Distinguish task-level vs process-instance-level identity links
When it happens
Trigger: GET/DELETE /runtime/process-instances/{id}/identitylinks/users/{identityId}/{type} where no IdentityLink on that process instance matches the user/group id and type returned by RuntimeService.getIdentityLinksForProcessInstance.
Common situations: Link already deleted (double delete / concurrent request); wrong type string (e.g. 'assignee' vs 'participant'); identityId belongs to a task identity link, not a process instance one; typo in user/group id.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 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/6d511eaa4b9f6014.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/process/ProcessInstanceIdentityLinkResource.java:122
}
if (type == null) {
throw new FlowableIllegalArgumentException("Type is required.");
}
}
protected IdentityLink getIdentityLink(String identityId, String family, String type, String processInstanceId) {
// Perhaps it would be better to offer getting a single identity link
// from the API
List<IdentityLink> allLinks = runtimeService.getIdentityLinksForProcessInstance(processInstanceId);
for (IdentityLink link : allLinks) {
if (RestUrls.SEGMENT_IDENTITYLINKS_FAMILY_USERS.equals(family) && identityId.equals(link.getUserId()) && link.getType().equals(type)) {
return link;
} else if (RestUrls.SEGMENT_IDENTITYLINKS_FAMILY_GROUPS.equals(family) && identityId.equals(link.getGroupId()) && link.getType().equals(type)) {
return link;
}
}
throw new FlowableObjectNotFoundException("Could not find the requested identity link.", IdentityLink.class);
}
}
View on GitHub (pinned to d6d39ce1c6)