{"record":{"id":"50295bfa0983dd35","repo":"flowable/flowable-engine","slug":"deploymentid-is-null-50295b","errorCode":null,"errorMessage":"deploymentId is null","messagePattern":"deploymentId is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/HistoricDecisionExecutionQueryImpl.java","lineNumber":90,"sourceCode":"    @Override\n    public DmnHistoricDecisionExecutionQuery ids(Set<String> ids) {\n        this.ids = ids;\n        return this;\n    }\n\n    @Override\n    public DmnHistoricDecisionExecutionQuery decisionDefinitionId(String decisionDefinitionId) {\n        if (decisionDefinitionId == null) {\n            throw new FlowableIllegalArgumentException(\"decisionDefinitionId is null\");\n        }\n        this.decisionDefinitionId = decisionDefinitionId;\n        return this;\n    }\n    \n    @Override\n    public DmnHistoricDecisionExecutionQuery deploymentId(String deploymentId) {\n        if (deploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentId is null\");\n        }\n        this.deploymentId = deploymentId;\n        return this;\n    }\n    \n    @Override\n    public DmnHistoricDecisionExecutionQuery decisionKey(String decisionKey) {\n        if (decisionKey == null) {\n            throw new FlowableIllegalArgumentException(\"decisionKey is null\");\n        }\n        this.decisionKey = decisionKey;\n        return this;\n    }\n\n    @Override\n    public DmnHistoricDecisionExecutionQuery instanceId(String instanceId) {\n        if (instanceId == null) {\n            throw new FlowableIllegalArgumentException(\"instanceId is null\");","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/HistoricDecisionExecutionQueryImpl.java#L72-L108","documentation":"HistoricDecisionExecutionQueryImpl.deploymentId(String) throws FlowableIllegalArgumentException when the deployment id argument is null. Flowable validates null criteria eagerly in the query builder because a null deployment id cannot be translated into a meaningful database filter.","triggerScenarios":"Calling dmnHistoryService.createHistoricDecisionExecutionQuery().deploymentId(null), typically when the deployment id was never captured (e.g. the deployment step was skipped) or comes from an unset configuration/variable.","commonSituations":"History cleanup or audit tooling parameterized by deployment id where the variable is uninitialized; integration tests that forgot to deploy a DMN deployment before querying; API handlers forwarding an absent request parameter.","solutions":["Ensure a valid DMN deployment id (from dmnRepositoryService.createDeployment().deploy()) is passed","Guard the call: only chain deploymentId(...) when the id is non-null, otherwise query without that filter","Check upstream lookup code (deployments by key/time) for silent empty results producing null"],"exampleFix":"// before\nquery.deploymentId(lastDeploymentId); // may be null when no deployments exist\n// after\nif (lastDeploymentId != null) {\n    query.deploymentId(lastDeploymentId);\n}","handlingStrategy":"validation","validationCode":"if (deploymentId == null) { throw new IllegalArgumentException(\"deploymentId must be provided\"); }","typeGuard":"boolean hasDeploymentId(String id) { return id != null && !id.isEmpty(); }","tryCatchPattern":"try { query.deploymentId(depId); } catch (FlowableIllegalArgumentException e) { log.warn(\"No deployment id available; querying without deployment filter\"); }","preventionTips":["Keep the id returned by deploymentBuilder.deploy() and persist it before history queries","In tests, assert a DMN deployment exists before running history queries"],"tags":["flowable","dmn","history","query","null-check"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}