flowable/flowable-engine · error · FlowableIllegalArgumentException
scopeId is empty
Error message
scopeId is empty
What it means
Fluent-setter validation in InternalEntityLinkQueryImpl.scopeId: the scope id filter is null or empty (StringUtils.isEmpty), which would break entity-link SQL scoping; the builder rejects it so the caller fixes the identifier.
Solutions
- Check the value with StringUtils.isNotBlank before calling scopeId.
- Ensure the entity whose id you pass actually exists and its id was fetched correctly.
- Guard the query-building code so the query is only executed when a scope id is available.
Example fix
// before
query.scopeId(scopeId).list(); // may throw if empty
// after
if (StringUtils.isNotBlank(scopeId)) {
query.scopeId(scopeId).list();
} Defensive patterns
Strategy: validation
Validate before calling
if (StringUtils.isBlank(scopeId)) { throw new IllegalArgumentException("scopeId required"); } Try / catch
try {
links = entityLinkQuery.scopeId(scopeId).list();
} catch (FlowableIllegalArgumentException e) {
links = Collections.emptyList();
} Prevention
- Blank-check all ids before building entity-link queries
- Centralize query construction in a helper that validates inputs
- Ensure upstream id lookups fail fast instead of returning empty strings
When it happens
Trigger: Calling InternalEntityLinkQuery.scopeId("") or scopeId(null) before executing the query.
Common situations: A process/case variable holding the scope id was not set yet; passing an uninitialized String field from caller code; copying a query builder chain from code where the id lookup failed silently.
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
- scopeIds is empty
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/e606d84da8325a3d.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-entitylink-service/src/main/java/org/flowable/entitylink/service/impl/InternalEntityLinkQueryImpl.java:58
protected String scopeType;
protected String referenceScopeId;
protected String referenceScopeDefinitionId;
protected String referenceScopeType;
protected String rootScopeId;
protected String rootScopeType;
protected String linkType;
protected String hierarchyType;
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");View on GitHub (pinned to d6d39ce1c6)