{"record":{"id":"bd784570fb880828","repo":"flowable/flowable-engine","slug":"disabledafter-is-null","errorCode":null,"errorMessage":"disabledAfter is null","messagePattern":"disabledAfter is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/PlanItemInstanceQueryImpl.java","lineNumber":454,"sourceCode":"    }\n\n    @Override\n    public PlanItemInstanceQuery planItemInstanceLastDisabledBefore(Date disabledBefore) {\n        if (disabledBefore == null) {\n            throw new FlowableIllegalArgumentException(\"disabledBefore is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.lastDisabledBefore = disabledBefore;\n        } else {\n            this.lastDisabledBefore = disabledBefore;\n        }\n        return this;\n    }\n\n    @Override\n    public PlanItemInstanceQuery planItemInstanceLastDisabledAfter(Date disabledAfter) {\n        if (disabledAfter == null) {\n            throw new FlowableIllegalArgumentException(\"disabledAfter is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.lastDisabledAfter = disabledAfter;\n        } else {\n            this.lastDisabledAfter = disabledAfter;\n        }\n        return this;\n    }\n\n    @Override\n    public PlanItemInstanceQuery planItemInstanceLastStartedBefore(Date startedBefore) {\n        if (startedBefore == null) {\n            throw new FlowableIllegalArgumentException(\"activatedBefore is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.lastStartedBefore = startedBefore;\n        } else {\n            this.lastStartedBefore = startedBefore;","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/PlanItemInstanceQueryImpl.java#L436-L472","documentation":"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.","triggerScenarios":"Invoking planItemInstanceLastDisabledAfter(null), typically from an unset filter variable or an unmapped request attribute passed straight into the query.","commonSituations":"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.","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."],"exampleFix":"// before\nquery.planItemInstanceLastDisabledAfter(rawFilter); // null\n// after\nif (rawFilter != null) {\n    query.planItemInstanceLastDisabledAfter(rawFilter);\n}","handlingStrategy":"validation","validationCode":"if (disabledAfter == null) {\n    throw new IllegalArgumentException(\"disabledAfter requires a non-null Date\");\n}\nquery.planItemInstanceLastDisabledAfter(disabledAfter);","typeGuard":"boolean isValidBound(Date d) { return d != null; }","tryCatchPattern":"try {\n    query.planItemInstanceLastDisabledAfter(disabledAfter);\n} catch (FlowableIllegalArgumentException e) {\n    query = cmmnRuntimeService.createPlanItemInstanceQuery();\n}","preventionTips":["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"],"tags":["java","flowable","cmmn","query","null-argument"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}