flowable/flowable-engine · error · FlowableObjectNotFoundException
Required decision <decisionId> is not available
Error message
Required decision <decisionId> is not available
What it means
When executing a decision service, Flowable topologically sorts required decisions to determine execution order. If a decision referenced (via required decisions/decision dependencies) is not among the decisions in the current deployment/scope, a FlowableObjectNotFoundException is thrown.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/agenda/operation/ExecuteDecisionServiceOperation.java:105
if (sortDecision.getRequiredDecisions().isEmpty()) {
sortDecisions.addFirst(sortDecision);
} else {
sortDecisions.addLast(sortDecision);
}
}
for (Decision decision : sortDecisions) {
if (!visited.get(decision.getId())) {
executeSort(decisionsById, decision.getId(), visited, order);
}
}
return order;
}
private void executeSort(Map<String, Decision> decisions, String decisionId, Map<String, Boolean> visited, List<Decision> order) {
if (!decisions.containsKey(decisionId)) {
throw new FlowableObjectNotFoundException("Required decision " + decisionId + " is not available");
}
// Mark the current node as visited
visited.replace(decisionId, true);
// We reuse the algorithm on all adjacent nodes to the current node
for (InformationRequirement requiredDecision : decisions.get(decisionId).getRequiredDecisions()) {
if (!visited.get(requiredDecision.getRequiredDecision().getParsedId())) {
executeSort(decisions, requiredDecision.getRequiredDecision().getParsedId(), visited, order);
}
}
// Put the current node in the array
order.add(decisions.get(decisionId));
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Ensure all DMN files referenced as required decisions are in the same deployment
- Check the decision id strings referenced by the decision service match actual decision ids (case-sensitive)
- Redeploy the complete DMN artifact set for that tenant
- Inspect the decision service's requiredDecisions in the DMN XML to enumerate missing keys
Example fix
// before <decisionService>... requires decision 'risk-score' but only 'fraud-check' deployed // after deploy both decisions dmn files in the repository before executing the decision service
Defensive patterns
Strategy: try-catch
Validate before calling
for (String requiredId : decisionServiceInfo.getRequiredDecisions()) {
if (repositoryService.createDecisionQuery().decisionKey(requiredId).list().isEmpty()) {
throw new IllegalStateException("required decision not deployed: " + requiredId);
}
} Try / catch
try { dmnEngine.executeDecisionServiceByKey(serviceKey, vars); }
catch (FlowableObjectNotFoundException e) {
LOG.error("missing required decision in deployment: {}", e.getMessage());
// redeploy full DMN artifact set
} Prevention
- Deploy all DMN resources of a decision service in one deployment
- Keep decision ids stable across deployments
- Verify referenced decision ids after refactors/renames
When it happens
Trigger: executeSort visits decisionId while computing the execution order and decisions map (built from the deployment's decisions for this decision service) does not contain that key.
Common situations: A DMN deployment is missing one of the decisions referenced by the decision service's required decisions; deploying a partial set of DMN resources; renaming decision ids after they were cross-referenced; case/tenant-specific deployments lacking a dependency.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Could not find deployment with id <deploymentId>
- Could not find deployment with id <deploymentId>
- Could not find a resource with id '<resourceName>' in deploy
- Could not find an app deployment with id '<deploymentId>
- no apps deployed with key = '' and version = ''
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5838ab280d3895c0.
Report an issue: GitHub.