flowable/flowable-engine · error · FlowableIllegalArgumentException
linkType is empty
Error message
linkType is empty
What it means
InternalEntityLinkQueryImpl.linkType sets the entity link type filter (e.g. 'participant', 'child'). It throws FlowableIllegalArgumentException when passed null or an empty string, because an empty linkType yields an invalid query. This is a fail-fast argument check on the query builder.
Solutions
- Pass a valid link type constant, e.g. EntityLinkTypes.PARTICIPANT or CHILD.
- Validate the link type source (request data, config) before calling the builder.
- If no link type filter is needed, omit the call instead of passing an empty value.
Example fix
// before
query.linkType(linkType); // linkType may be null
// after
if (StringUtils.isNotEmpty(linkType)) {
query.linkType(EntityLinkTypes.PARTICIPANT);
} Defensive patterns
Strategy: validation
Validate before calling
if (linkType == null || linkType.isEmpty()) {
throw new IllegalArgumentException("linkType must be set (e.g. participant, child)");
}
internalEntityLinkQuery.linkType(linkType); Type guard
boolean hasLinkType(String t) { return t != null && !t.trim().isEmpty(); } Try / catch
try {
query.linkType(linkType);
} catch (FlowableIllegalArgumentException e) {
LOG.warn("linkType missing: {}", e.getMessage());
throw new InvalidRequestException("linkType is required", e);
} Prevention
- Reference EntityLinkTypes constants, not ad-hoc strings.
- Validate incoming request DTOs for linkType before querying.
- Skip optional filters instead of passing empty strings.
When it happens
Trigger: Calling internalEntityLinkQuery.linkType(null) or linkType("") while building the query.
Common situations: Storing the link type in a constant/enum whose value is empty, binding the link type from a request payload missing the field, or upgrading Flowable where the expected link type naming changed.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- hierarchyType is empty
- rootScopeId is empty
- rootScopeType is empty
- callbackIds is null or empty
- Cannot combine onlyTimers() with onlyMessages() in the same…
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/10c492eb608042eb.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-entitylink-service/src/main/java/org/flowable/entitylink/service/impl/InternalEntityLinkQueryImpl.java:139
throw new FlowableIllegalArgumentException("rootScopeId is empty");
}
this.rootScopeId = rootScopeId;
return this;
}
@Override
public InternalEntityLinkQuery<E> rootScopeType(String rootScopeType) {
if (StringUtils.isEmpty(rootScopeType)) {
throw new FlowableIllegalArgumentException("rootScopeType is empty");
}
this.rootScopeType = rootScopeType;
return this;
}
@Override
public InternalEntityLinkQuery<E> linkType(String linkType) {
if (StringUtils.isEmpty(linkType)) {
throw new FlowableIllegalArgumentException("linkType is empty");
}
this.linkType = linkType;
return this;
}
@Override
public InternalEntityLinkQuery<E> hierarchyType(String hierarchyType) {
if (StringUtils.isEmpty(hierarchyType)) {
throw new FlowableIllegalArgumentException("hierarchyType is empty");
}
this.hierarchyType = hierarchyType;
return this;
}
@Override
public List<E> list() {
return listProvider.apply(this);
}View on GitHub (pinned to d6d39ce1c6)