{"record":{"id":"ad8748721a895c28","repo":"flowable/flowable-engine","slug":"resourcename-is-null-ad8748","errorCode":null,"errorMessage":"resourceName is null","messagePattern":"resourceName is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java","lineNumber":197,"sourceCode":"            throw new FlowableIllegalArgumentException(\"key is null\");\n        }\n        this.key = key;\n        return this;\n    }\n\n    @Override\n    public CaseDefinitionQueryImpl caseDefinitionKeyLike(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 CaseDefinitionQueryImpl caseDefinitionResourceName(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 CaseDefinitionQueryImpl caseDefinitionResourceNameLike(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 CaseDefinitionQueryImpl caseDefinitionVersion(Integer version) {\n        checkVersion(version);\n        this.version = version;","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java#L179-L215","documentation":"FlowableIllegalArgumentException thrown by CaseDefinitionQueryImpl.caseDefinitionResourceName(String) when the resource name is null. The resource name is the path of the .cmmn/.cmmn.xml file inside the deployment; filtering by a null resource name is invalid and rejected at query-build time.","triggerScenarios":"Calling caseDefinitionQuery.caseDefinitionResourceName(null), typically when the resource path variable was not initialized or a file lookup returned null.","commonSituations":"Tooling that maps a deployed resource back to its case definition; the resource path was missing from the deployment record or the config used a wrong property name yielding null.","solutions":["Pass the actual resource name as deployed, e.g. caseDefinitionResourceName(\"my-case.cmmn.xml\").","Apply the filter conditionally only when the resource name is non-null.","Verify the deployment actually contains the resource and that the path variable was populated correctly."],"exampleFix":"// before\nquery.caseDefinitionResourceName(resourceName); // may be null\n\n// after\nif (resourceName != null) {\n    query.caseDefinitionResourceName(resourceName);\n}","handlingStrategy":"validation","validationCode":"if (resourceName != null) {\n    query.caseDefinitionResourceName(resourceName);\n}","typeGuard":"boolean hasResource = resourceName != null && !resourceName.isEmpty();","tryCatchPattern":"try {\n    query.caseDefinitionResourceName(resourceName);\n} catch (FlowableIllegalArgumentException e) {\n    // resource name unknown — query without resource filter or rethrow\n}","preventionTips":["Take resource names from CaseDefinition.getResourceName() of a known definition rather than hand-built paths.","Null-check results of resource lookups before using them as query filters."],"tags":["flowable","cmmn","query","resource-name","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"}