flowable/flowable-engine · error · FlowableIllegalArgumentException
disabledAfter is null
Error message
disabledAfter is null
What it means
planItemInstanceLastDisabledAfter(Date) throws FlowableIllegalArgumentException 'disabledAfter is null' if the supplied Date is null. The check lives directly in the builder method of PlanItemInstanceQueryImpl (both the normal and OR-query paths expect a real Date). Flowable rejects null because it cannot form a date comparison.
Solutions
- Provide a valid Date argument.
- Guard with if (date != null) before chaining the filter.
- Default the missing date at the input boundary.
- Handle FlowableIllegalArgumentException and rebuild without the filter.
Example fix
// before
query.planItemInstanceLastDisabledAfter(rawFilter); // null
// after
if (rawFilter != null) {
query.planItemInstanceLastDisabledAfter(rawFilter);
} Defensive patterns
Strategy: validation
Validate before calling
if (disabledAfter == null) {
throw new IllegalArgumentException("disabledAfter requires a non-null Date");
}
query.planItemInstanceLastDisabledAfter(disabledAfter); Type guard
boolean isValidBound(Date d) { return d != null; } Try / catch
try {
query.planItemInstanceLastDisabledAfter(disabledAfter);
} catch (FlowableIllegalArgumentException e) {
query = cmmnRuntimeService.createPlanItemInstanceQuery();
} Prevention
- Guard optional filters before invoking builder methods
- Fail fast at the controller layer on malformed filter payloads
- Use defaults for missing time bounds
- Test query construction with unset DTO fields
When it happens
Trigger: Invoking planItemInstanceLastDisabledAfter(null), typically from an unset filter variable or an unmapped request attribute passed straight into the query.
Common situations: Optional 'disabledAfter' filter in admin UIs; batch scripts iterating filters where one entry lacks a date; null results from Calendar-to-Date conversions; API version changes altering payload field names.
Related errors
- activatedBefore is null
- completedBefore is null
- disabledBefore is null
- enabledAfter is null
- enabledBefore is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/bd784570fb880828.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/PlanItemInstanceQueryImpl.java:454
}
@Override
public PlanItemInstanceQuery planItemInstanceLastDisabledBefore(Date disabledBefore) {
if (disabledBefore == null) {
throw new FlowableIllegalArgumentException("disabledBefore is null");
}
if (inOrStatement) {
this.currentOrQueryObject.lastDisabledBefore = disabledBefore;
} else {
this.lastDisabledBefore = disabledBefore;
}
return this;
}
@Override
public PlanItemInstanceQuery planItemInstanceLastDisabledAfter(Date disabledAfter) {
if (disabledAfter == null) {
throw new FlowableIllegalArgumentException("disabledAfter is null");
}
if (inOrStatement) {
this.currentOrQueryObject.lastDisabledAfter = disabledAfter;
} else {
this.lastDisabledAfter = disabledAfter;
}
return this;
}
@Override
public PlanItemInstanceQuery planItemInstanceLastStartedBefore(Date startedBefore) {
if (startedBefore == null) {
throw new FlowableIllegalArgumentException("activatedBefore is null");
}
if (inOrStatement) {
this.currentOrQueryObject.lastStartedBefore = startedBefore;
} else {
this.lastStartedBefore = startedBefore;View on GitHub (pinned to d6d39ce1c6)