flowable/flowable-engine · error · FlowableIllegalArgumentException
resourceName is null
Error message
resourceName is null
What it means
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.
Source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java:197
throw new FlowableIllegalArgumentException("key is null");
}
this.key = key;
return this;
}
@Override
public CaseDefinitionQueryImpl caseDefinitionKeyLike(String keyLike) {
if (keyLike == null) {
throw new FlowableIllegalArgumentException("keyLike is null");
}
this.keyLike = keyLike;
return this;
}
@Override
public CaseDefinitionQueryImpl caseDefinitionResourceName(String resourceName) {
if (resourceName == null) {
throw new FlowableIllegalArgumentException("resourceName is null");
}
this.resourceName = resourceName;
return this;
}
@Override
public CaseDefinitionQueryImpl caseDefinitionResourceNameLike(String resourceNameLike) {
if (resourceNameLike == null) {
throw new FlowableIllegalArgumentException("resourceNameLike is null");
}
this.resourceNameLike = resourceNameLike;
return this;
}
@Override
public CaseDefinitionQueryImpl caseDefinitionVersion(Integer version) {
checkVersion(version);
this.version = version;View on GitHub (pinned to d6d39ce1c6)
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.
Example fix
// before
query.caseDefinitionResourceName(resourceName); // may be null
// after
if (resourceName != null) {
query.caseDefinitionResourceName(resourceName);
} Defensive patterns
Strategy: validation
Validate before calling
if (resourceName != null) {
query.caseDefinitionResourceName(resourceName);
} Type guard
boolean hasResource = resourceName != null && !resourceName.isEmpty();
Try / catch
try {
query.caseDefinitionResourceName(resourceName);
} catch (FlowableIllegalArgumentException e) {
// resource name unknown — query without resource filter or rethrow
} Prevention
- 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.
When it happens
Trigger: Calling caseDefinitionQuery.caseDefinitionResourceName(null), typically when the resource path variable was not initialized or a file lookup returned null.
Common situations: 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.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/ad8748721a895c28.
Report an issue: GitHub.