flowable/flowable-engine · error · FlowableIllegalArgumentException
version is null
Error message
version is null
What it means
DecisionQueryImpl.checkVersion(Integer) throws FlowableIllegalArgumentException("version is null") when a version filter method (decisionVersion, decisionVersionGreaterThan, decisionVersionGreaterThanOrEquals, decisionVersionLowerThan, decisionVersionLowerThanOrEquals) is given a null Integer. Version comparisons require a concrete number for the generated SQL; a null version is a programming error, so it is rejected before any query runs.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DecisionQueryImpl.java:230
}
@Override
public DmnDecisionQuery decisionVersionLowerThan(Integer decisionVersion) {
checkVersion(decisionVersion);
this.versionLt = decisionVersion;
return this;
}
@Override
public DmnDecisionQuery decisionVersionLowerThanOrEquals(Integer decisionVersion) {
checkVersion(decisionVersion);
this.versionLte = decisionVersion;
return this;
}
protected void checkVersion(Integer version) {
if (version == null) {
throw new FlowableIllegalArgumentException("version is null");
} else if (version <= 0) {
throw new FlowableIllegalArgumentException("version must be positive");
}
}
@Override
public DecisionQueryImpl latestVersion() {
this.latest = true;
return this;
}
@Override
public DmnDecisionQuery decisionTenantId(String tenantId) {
if (tenantId == null) {
throw new FlowableIllegalArgumentException("decision tenantId is null");
}
this.tenantId = tenantId;
return this;View on GitHub (pinned to d6d39ce1c6)
Solutions
- Resolve a concrete version number (>= 1) before applying any version filter.
- Only call the version method when the Integer is non-null; otherwise omit the filter (e.g. use latestVersion()).
- Validate/parse the version parameter at the entry point and fail fast with a clear message.
Example fix
// before
query.decisionVersion(versionParam); // Integer, may be null
// after
if (versionParam != null) {
query.decisionVersion(versionParam);
} else {
query.latestVersion();
} Defensive patterns
Strategy: validation
Validate before calling
if (version != null) {
if (version < 1) {
throw new IllegalArgumentException("version must be >= 1, got: " + version);
}
query.decisionVersion(version);
} Type guard
boolean isValidVersion(Integer v) { return v != null && v > 0; } Try / catch
try {
query.decisionVersion(version);
} catch (FlowableIllegalArgumentException e) {
if (e.getMessage() != null && e.getMessage().contains("version")) {
query.latestVersion(); // sensible fallback
} else { throw e; }
} Prevention
- Parse version strings with explicit null/empty handling
- Never use 0 as a 'default' DMN version — use latestVersion() instead
- Validate Integer fields resolved from maps/config before use
When it happens
Trigger: Calling decisionVersion(null) or decisionVersionGreaterThan(null) etc., typically with an Integer variable parsed from user input/config that failed to parse or was never set; also when autoboxing a null Integer returned by a lookup.
Common situations: REST endpoints where the version query parameter is absent and Integer.valueOf is not reached; config maps whose key is missing so Map.get returns null; migration code between decision versions where the version field is optional upstream.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/34d7fba6da22301a.
Report an issue: GitHub.