flowable/flowable-engine · error · FlowableIllegalArgumentException
scopeIds is empty
Error message
scopeIds is empty
What it means
Fluent-setter validation in InternalEntityLinkQueryImpl.scopeIds: the scope-id collection filter is null or empty, so an IN clause cannot be built and the query builder rejects it rather than returning unscoped results.
Solutions
- Check !CollectionUtils.isEmpty(scopeIds) before calling.
- Skip the query entirely or use an unfiltered variant when no ids are available.
- Verify the upstream logic that populates the collection.
Example fix
// before
query.scopeIds(ids).list(); // throws when ids empty
// after
if (ids != null && !ids.isEmpty()) {
query.scopeIds(ids).list();
} Defensive patterns
Strategy: validation
Validate before calling
if (CollectionUtils.isEmpty(scopeIds)) { return Collections.emptyList(); } Try / catch
try {
links = entityLinkQuery.scopeIds(ids).list();
} catch (FlowableIllegalArgumentException e) {
links = Collections.emptyList();
} Prevention
- Skip the query when the id collection is empty
- Guard collection-populating logic against producing empty lists silently
- Use CollectionUtils.isEmpty checks in query builders
When it happens
Trigger: Calling InternalEntityLinkQuery.scopeIds(null), scopeIds(Collections.emptyList()), or scopeIds(list) where the list was never populated.
Common situations: Building queries from a dynamic set of ids that turned out empty (e.g. no matching parent scopes found); passing an uninitialized collection variable.
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
- referenceScopeType is empty
- scopeDefinitionId is empty
- scopeId is empty
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/330897baed1fb4a8.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-entitylink-service/src/main/java/org/flowable/entitylink/service/impl/InternalEntityLinkQueryImpl.java:67
public InternalEntityLinkQueryImpl(Function<InternalEntityLinkQueryImpl<E>, List<E>> listProvider,
Function<InternalEntityLinkQueryImpl<E>, E> singleResultProvider) {
this.listProvider = listProvider;
this.singleResultProvider = singleResultProvider;
}
@Override
public InternalEntityLinkQuery<E> scopeId(String scopeId) {
if (StringUtils.isEmpty(scopeId)) {
throw new FlowableIllegalArgumentException("scopeId is empty");
}
this.scopeId = scopeId;
return this;
}
@Override
public InternalEntityLinkQuery<E> scopeIds(Collection<String> scopeIds) {
if (scopeIds == null || scopeIds.isEmpty()) {
throw new FlowableIllegalArgumentException("scopeIds is empty");
}
this.scopeIds = scopeIds;
return this;
}
@Override
public InternalEntityLinkQuery<E> scopeDefinitionId(String scopeDefinitionId) {
if (StringUtils.isEmpty(scopeDefinitionId)) {
throw new FlowableIllegalArgumentException("scopeDefinitionId is empty");
}
this.scopeDefinitionId = scopeDefinitionId;
return this;
}
@Override
public InternalEntityLinkQuery<E> scopeType(String scopeType) {
if (StringUtils.isEmpty(scopeType)) {
throw new FlowableIllegalArgumentException("scopeType is empty");View on GitHub (pinned to d6d39ce1c6)