flowable/flowable-engine · error · FlowableIllegalArgumentException
scopeType is null
Error message
scopeType is null
What it means
FlowableIllegalArgumentException thrown by DmnHistoricDecisionExecutionQuery.scopeType(String) when the caller passes a null scope type. The DMN historic query API requires every filter criterion to be non-null so the underlying query builder can construct a valid WHERE clause. It is an immediate fail-fast guard, not a state corruption.
Solutions
- Pass a valid non-null scope type string (e.g. the scope type of the execution, such as 'bpmn' or 'cmmn') instead of null.
- If no scope filtering is desired, omit the scopeType() call entirely — it is an optional filter.
- Null-check the source of the value (config, request param, variable) before invoking scopeType().
Example fix
// before
query.scopeType(config.get("scopeType"));
// after
String scopeType = config.get("scopeType");
if (scopeType != null) {
query.scopeType(scopeType);
} Defensive patterns
Strategy: validation
Validate before calling
if (scopeType == null || scopeType.isEmpty()) { throw new IllegalArgumentException("scopeType must be a non-empty string"); } Type guard
boolean isValidScopeType(Object v) { return v instanceof String s && !s.isEmpty(); } Try / catch
try {
query.scopeType(scopeType);
} catch (FlowableIllegalArgumentException e) {
log.warn("Ignoring scopeType filter: {}", e.getMessage());
} Prevention
- Only call scopeType() when the value is known non-null; it is an optional filter.
- Centralize query building in one helper that skips null filters.
- Never build filters from unvalidated config/request maps.
When it happens
Trigger: Calling dmnHistoryService.createHistoricDecisionExecutionQuery().scopeType(null), typically when the scope type variable comes from an unset configuration value, a deserialized map entry, or an unassigned method parameter.
Common situations: Building the query programmatically from config properties or request parameters where the scope-type key is absent; refactoring that renames a constant leaving a field null; passing a variable that was never initialized instead of omitting the scopeType filter entirely.
Related errors
- activityId is null
- decisionDefinitionId is null
- decisionKey is null
- deploymentId is null
- executionId is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5f69bac117e159fd.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/HistoricDecisionExecutionQueryImpl.java:135
throw new FlowableIllegalArgumentException("executionId is null");
}
this.executionId = executionId;
return this;
}
@Override
public DmnHistoricDecisionExecutionQuery activityId(String activityId) {
if (activityId == null) {
throw new FlowableIllegalArgumentException("activityId is null");
}
this.activityId = activityId;
return this;
}
@Override
public DmnHistoricDecisionExecutionQuery scopeType(String scopeType) {
if (scopeType == null) {
throw new FlowableIllegalArgumentException("scopeType is null");
}
this.scopeType = scopeType;
return this;
}
@Override
public DmnHistoricDecisionExecutionQuery withoutScopeType() {
this.withoutScopeType = true;
return this;
}
@Override
public DmnHistoricDecisionExecutionQuery processInstanceIdWithChildren(String processInstanceId) {
this.processInstanceIdWithChildren = processInstanceId;
return this;
}
@OverrideView on GitHub (pinned to d6d39ce1c6)