flowable/flowable-engine · error · FlowableIllegalArgumentException
referenceScopeType is empty
Error message
referenceScopeType is empty
What it means
Fluent-setter validation in InternalEntityLinkQueryImpl.referenceScopeType: the reference scope type filter is null or empty; the builder refuses it because entity-link type discrimination requires a non-blank value.
Solutions
- Pass a valid constant from org.flowable.common.engine.impl.scope.ScopeTypes.
- Validate non-blank before invoking the query builder.
- Fix the upstream data/mapping that yields the empty scope type.
Example fix
// before
query.referenceScopeType(refType); // empty
// after
if (StringUtils.isNotBlank(refType)) {
query.referenceScopeType(refType).list();
} Defensive patterns
Strategy: validation
Validate before calling
if (StringUtils.isBlank(referenceScopeType)) { throw new IllegalArgumentException("referenceScopeType required"); } Try / catch
try {
links = entityLinkQuery.referenceScopeType(refType).list();
} catch (FlowableIllegalArgumentException e) {
links = Collections.emptyList();
} Prevention
- Use ScopeTypes constants for reference scope types
- Validate inputs in a shared query-builder helper
- Ensure data feeding the type field is populated before querying
When it happens
Trigger: Calling InternalEntityLinkQuery.referenceScopeType("") or referenceScopeType(null).
Common situations: Deriving the type of the referenced entity from data that was absent; passing an empty string default instead of a ScopeTypes constant.
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
- referenceScopeDefinitionId is empty
- referenceScopeId is empty
- scopeDefinitionId is empty
- scopeId is empty
- scopeIds is empty
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/8de63ebcc452b63c.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-entitylink-service/src/main/java/org/flowable/entitylink/service/impl/InternalEntityLinkQueryImpl.java:112
throw new FlowableIllegalArgumentException("referenceScopeId is empty");
}
this.referenceScopeId = referenceScopeId;
return this;
}
@Override
public InternalEntityLinkQuery<E> referenceScopeDefinitionId(String referenceScopeDefinitionId) {
if (StringUtils.isEmpty(referenceScopeDefinitionId)) {
throw new FlowableIllegalArgumentException("referenceScopeDefinitionId is empty");
}
this.referenceScopeDefinitionId = referenceScopeDefinitionId;
return this;
}
@Override
public InternalEntityLinkQuery<E> referenceScopeType(String referenceScopeType) {
if (StringUtils.isEmpty(referenceScopeType)) {
throw new FlowableIllegalArgumentException("referenceScopeType is empty");
}
this.referenceScopeType = referenceScopeType;
return this;
}
@Override
public InternalEntityLinkQuery<E> rootScopeId(String rootScopeId) {
if (StringUtils.isEmpty(rootScopeId)) {
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");View on GitHub (pinned to d6d39ce1c6)