flowable/flowable-engine · error · FlowableIllegalArgumentException
no decision with id: ' ' found in definition
Error message
no decision with id: '<decisionKey>' found in definition
What it means
FlowableIllegalArgumentException thrown after the DmnDefinition was resolved but definition.getDecisionById(decisionKey) returns null — the decision key exists as a deployed definition entity, yet no <decision> element with that id is present in the parsed DMN model. This indicates the repository Decision row and the DMN XML content are inconsistent.
Solutions
- Redeploy the .dmn resource so the model content matches the repository metadata.
- Verify the <decision id="..."> in the .dmn XML equals the decisionKey being requested.
- Clear/restart the engine (definition cache) after re-deploying so the fresh model is parsed.
- Use DmnRepositoryService.getDmnModel(deploymentId) to inspect which decision ids the deployed model actually contains.
Example fix
// before
<decision id="approval_v1" name="Approval"> ... </decision> // key used: approval
// after
<decision id="approval" name="Approval"> ... </decision> // then redeploy
dmnRepositoryService.createDeployment().addClasspathResource("dmn/approval.dmn").deploy(); Defensive patterns
Strategy: validation
Validate before calling
DmnModel model = dmnRepositoryService.getDmnModel(deploymentId);
if (model == null || model.getDecisionById(key) == null) {
throw new IllegalStateException("Deployed model " + deploymentId + " has no decision id " + key);
} Try / catch
try { dmnEngine.executeDecision(builder.decisionKey(key)); }
catch (FlowableIllegalArgumentException e) { log.error("Model/repository mismatch for key {}", key, e); redeployDmnResource(); } Prevention
- Never edit .dmn decision ids after deployment without redeploying
- Keep repository metadata and XML in sync by always deploying whole resources
- Inspect getDmnModel(deploymentId) when renaming ids
When it happens
Trigger: Executing a decision where the key matched a Decision row in the repository, but the deployed .dmn XML does not contain a <decision id="key"> element (or the XML failed to expose that id).
Common situations: DMN XML edited to rename the decision id after deployment; repository cache holding a stale version; mismatch between decision-table id in the XML and the key used; partially failed deployment leaving metadata without the expected model content.
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
- byte array for resource
- Could not find deployment with id
- Could not find deployment with id
- could not get byte array from resource
- deployment does not exist
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/2f0e0d530a6c20af.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/AbstractExecuteDecisionCmd.java:191
} else {
throw new FlowableIllegalArgumentException("decisionKey is null");
}
executeDecisionContext.setDecisionId(decision.getId());
executeDecisionContext.setDecisionVersion(decision.getVersion());
executeDecisionContext.setDeploymentId(decision.getDeploymentId());
DecisionCacheEntry decisionTableCacheEntry = CommandContextUtil.getDmnEngineConfiguration().getDeploymentManager().resolveDecision(decision);
DmnDefinition dmnDefinition = decisionTableCacheEntry.getDmnDefinition();
return dmnDefinition;
}
protected void execute(CommandContext commandContext, DmnDefinition definition) {
Decision decision = definition.getDecisionById(executeDecisionContext.getDecisionKey());
if (decision == null) {
throw new FlowableIllegalArgumentException("no decision with id: '" + executeDecisionContext.getDecisionKey() + "' found in definition");
}
executeDecisionContext.setDmnElement(decision);
CommandContextUtil.getAgenda(commandContext).planExecuteDecisionOperation(executeDecisionContext, decision);
}
}
View on GitHub (pinned to d6d39ce1c6)