flowable/flowable-engine · error · IllegalStateException
Provided decision definition must have its resource name set
Error message
Provided decision definition must have its resource name set.
What it means
ResourceNameUtil.getDecisionRequirementsDiagramResourceNameFromDeployment derives a diagram resource name by stripping the DMN file suffix from the decision's resourceName; without a resource name it cannot form the base name and throws IllegalStateException. Like error 1333 this is an internal invariant enforced before diagram-resource lookup.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/deployer/ResourceNameUtil.java:52
}
return dmnFileResource;
}
public static String getDecisionRequirementsDiagramResourceName(String dmnFileResource, String decisionKey, String diagramSuffix) {
String dmnFileResourceBase = stripDmnFileSuffix(dmnFileResource);
return dmnFileResourceBase + decisionKey + "." + diagramSuffix;
}
/**
* Finds the name of a resource for the diagram for a decision definition. Assumes that the decision definition's key and (DMN) resource name are already set.
*
* @return name of an existing resource, or null if no matching image resource is found in the resources.
*/
public static String getDecisionRequirementsDiagramResourceNameFromDeployment(
DecisionEntity decisionDefinition, Map<String, EngineResource> resources) {
if (StringUtils.isEmpty(decisionDefinition.getResourceName())) {
throw new IllegalStateException("Provided decision definition must have its resource name set.");
}
String dmnResourceBase = stripDmnFileSuffix(decisionDefinition.getResourceName());
String key = decisionDefinition.getKey();
for (String diagramSuffix : DIAGRAM_SUFFIXES) {
String possibleName = dmnResourceBase + key + "." + diagramSuffix;
if (resources.containsKey(possibleName)) {
return possibleName;
}
possibleName = dmnResourceBase + diagramSuffix;
if (resources.containsKey(possibleName)) {
return possibleName;
}
}
return null;View on GitHub (pinned to d6d39ce1c6)
Solutions
- Ensure each decision's resourceName is set to its source .dmn resource during parsing/deployment.
- Fix the DMN XML/resource wiring so decisions map to a real deployed resource.
- Guard custom code with StringUtils.isNotEmpty(decision.getResourceName()) before calling diagram helpers.
- Disable diagram generation (DMN create diagram setting) if diagrams are not needed and resources are incomplete.
Example fix
// before
String diagramResource = ResourceNameUtil.getDecisionRequirementsDiagramResourceNameFromDeployment(decision, resources);
// after
if (StringUtils.isNotEmpty(decision.getResourceName())) {
String diagramResource = ResourceNameUtil.getDecisionRequirementsDiagramResourceNameFromDeployment(decision, resources);
} Defensive patterns
Strategy: validation
Validate before calling
if (StringUtils.isEmpty(decisionDefinition.getResourceName())) {
throw new IllegalStateException("Decision resource name missing; cannot resolve diagram resource");
} Try / catch
try {
String name = ResourceNameUtil.getDecisionRequirementsDiagramResourceNameFromDeployment(decision, resources);
} catch (IllegalStateException e) {
name = null; // no diagram resolution possible
} Prevention
- Ensure decisions carry their source resource name after parsing
- Validate DMN resources pre-deploy
- Disable diagram generation when resources are incomplete
When it happens
Trigger: Diagram-resource lookup during deployment when the DecisionEntity's resourceName is empty — usually the same root cause as missing key: malformed DMN XML or a custom parse handler that never set resourceName.
Common situations: Custom deployers interfering with resource assignment; decisions built programmatically; DMN resources deployed through a nonstandard path that bypasses resource-name population.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Provided decision definition must have both key and resource
- Cannot find case definition for id:
- DMN repository service is not available
- resourceName is null
- Dmn engine is not configured
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/47f02c06d3eb1506.
Report an issue: GitHub.