{"record":{"id":"2fbc70463a7f51b7","repo":"flowable/flowable-engine","slug":"resourcename-is-null-2fbc70","errorCode":null,"errorMessage":"resourceName is null","messagePattern":"resourceName is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DecisionQueryImpl.java","lineNumber":178,"sourceCode":"            throw new FlowableIllegalArgumentException(\"key is null\");\n        }\n        this.key = key;\n        return this;\n    }\n\n    @Override\n    public DecisionQueryImpl decisionKeyLike(String keyLike) {\n        if (keyLike == null) {\n            throw new FlowableIllegalArgumentException(\"keyLike is null\");\n        }\n        this.keyLike = keyLike;\n        return this;\n    }\n\n    @Override\n    public DecisionQueryImpl decisionResourceName(String resourceName) {\n        if (resourceName == null) {\n            throw new FlowableIllegalArgumentException(\"resourceName is null\");\n        }\n        this.resourceName = resourceName;\n        return this;\n    }\n\n    @Override\n    public DecisionQueryImpl decisionResourceNameLike(String resourceNameLike) {\n        if (resourceNameLike == null) {\n            throw new FlowableIllegalArgumentException(\"resourceNameLike is null\");\n        }\n        this.resourceNameLike = resourceNameLike;\n        return this;\n    }\n\n    @Override\n    public DecisionQueryImpl decisionVersion(Integer version) {\n        checkVersion(version);\n        this.version = version;","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DecisionQueryImpl.java#L160-L196","documentation":"DecisionQueryImpl.decisionResourceName(String) validates that the resource name is non-null. The resource name is compared to the DMN resource (e.g. 'orders.dmn') stored with the deployment, and null is not a valid comparison value, so the builder throws FlowableIllegalArgumentException immediately.","triggerScenarios":"Calling decisionResourceName(null) when looking up a decision by its .dmn resource file name — commonly when the file name comes from a variable, config property, or deployment descriptor that was not set.","commonSituations":"Code that reads a resource path from application config where the property is missing; generic query helper methods that pass through optional parameters unconditionally; renaming/relocating .dmn resources so the variable feeding the query is null.","solutions":["Pass the actual resource name (e.g. \"my-decision.dmn\"); check the deployment to get the stored name if unsure.","Guard the call: only add the resource-name filter when the value is non-null.","If you meant exact-key filtering, use decisionKey; if pattern matching, use decisionResourceNameLike with a non-null pattern."],"exampleFix":"// before\nquery.decisionResourceName(resourceName);\n// after\nif (resourceName != null) {\n    query.decisionResourceName(resourceName);\n} else {\n    logger.warn(\"resourceName not set, skipping resource filter\");\n}","handlingStrategy":"validation","validationCode":"if (resourceName == null || resourceName.isEmpty()) {\n    throw new IllegalArgumentException(\"resourceName must be provided\");\n}\nquery.decisionResourceName(resourceName);","typeGuard":"boolean hasResourceName(String r) { return r != null && !r.isEmpty(); }","tryCatchPattern":"try {\n    query.decisionResourceName(resourceName);\n} catch (FlowableIllegalArgumentException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"resourceName\")) {\n        // run query without the resource filter\n    } else { throw e; }\n}","preventionTips":["Keep resource names in a constants/config class instead of loose variables","Confirm the exact resource name against the deployment before querying","Make optional filters conditional in generic query helpers"],"tags":["java","flowable","dmn","null-check","query-builder"],"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"}