flowable/flowable-engine · error · FlowableObjectNotFoundException

No decision found for key

Error message

No decision found for key <decisionKey> and parent deployment id <parentDeploymentId>. There was also no fall back decision found without parent deployment id.

What it means

Flowable DMN throws this FlowableObjectNotFoundException when a decision is looked up by key and parent deployment id and no Decision exists for that pair, and the fallback lookup without the deployment id (findLatestDecisionByKey) also returns null. Execution stops because no deployed decision definition matches the key.

Solutions

  1. Query DmnRepositoryService.createDecisionQuery().decisionKey(key) to confirm the decision exists at all; if not, deploy the .dmn resource.
  2. Remove or fix the parentDeploymentId so the fallback findLatestDecisionByKey can resolve the latest deployed version.
  3. Correct the decision key (check the id inside the .dmn XML).
  4. Redeploy the DMN model into the deployment referenced by parentDeploymentId if deployment pinning is required.

Example fix

// before
builder.decisionKey("orderApproval").parentDeploymentId("stale-deployment-id");
// after
if (dmnRepositoryService.createDecisionQuery().decisionKey("orderApproval").count() == 0) {
    dmnRepositoryService.createDeployment().addClasspathResource("dmn/orderApproval.dmn").deploy();
}
builder.decisionKey("orderApproval"); // let fallback find latest by key
Defensive patterns

Strategy: validation

Validate before calling

if (dmnRepositoryService.createDecisionQuery().decisionKey(key).count() == 0) {
    throw new IllegalStateException("Decision " + key + " not deployed");
}

Try / catch

try { dmnEngine.executeDecision(builder.decisionKey(key).parentDeploymentId(dep)); }
catch (FlowableObjectNotFoundException e) { log.warn("Falling back: {}", e.getMessage()); dmnEngine.executeDecision(builder.decisionKey(key)); }

Prevention

When it happens

Trigger: Executing a decision with decisionKey and parentDeploymentId set (no tenantId) where findDecisionByKeyAndParentDeploymentId and the fallback findLatestDecisionByKey both return null.

Common situations: Parent deployment id points to a deployment that does not contain the decision; decision key misspelled; decision never deployed; deployment cascade-deleted; decision deployed under a different tenant so tenant-scoped queries can't see it.

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


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/f236dbaadca372d0. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/AbstractExecuteDecisionCmd.java:134

                }
            }
            
        } else if (StringUtils.isNotEmpty(decisionKey) && StringUtils.isNotEmpty(parentDeploymentId) &&
                        !dmnEngineConfiguration.isAlwaysLookupLatestDefinitionVersion()) {
            
            List<DmnDeployment> dmnDeployments = CommandContextUtil.getDeploymentEntityManager().findDeploymentsByQueryCriteria(
                new DmnDeploymentQueryImpl().parentDeploymentId(parentDeploymentId));

            if (dmnDeployments != null && dmnDeployments.size() != 0) {
                decision = decisionEntityManager.findDecisionByDeploymentAndKey(dmnDeployments.get(0).getId(), decisionKey);
            }

            if (decision == null) {
                // If there is no decision table found linked to the deployment id, try to find one without a specific deployment id.
                decision = decisionEntityManager.findLatestDecisionByKey(decisionKey);

                if (decision == null) {
                    throw new FlowableObjectNotFoundException("No decision found for key: " + decisionKey +
                        " and parent deployment id " + parentDeploymentId +
                        ". There was also no fall back decision found without parent deployment id.");
                }
            }
            
        } else if (StringUtils.isNotEmpty(decisionKey) && StringUtils.isNotEmpty(tenantId)) {
            decision = decisionEntityManager.findLatestDecisionByKeyAndTenantId(decisionKey, tenantId);
            if (decision == null) {
                if (executeDecisionContext.isFallbackToDefaultTenant() || dmnEngineConfiguration.isFallbackToDefaultTenant()) {
                    String defaultTenant = dmnEngineConfiguration.getDefaultTenantProvider().getDefaultTenant(tenantId, ScopeTypes.DMN, decisionKey);
                    if (StringUtils.isNotEmpty(defaultTenant)) {
                        decision = decisionEntityManager.findLatestDecisionByKeyAndTenantId(decisionKey, defaultTenant);
                        if (decision == null) {
                            throw new FlowableObjectNotFoundException("No decision found for key: " + decisionKey +
                                ". There was also no fall back decision found for default tenant " +
                                defaultTenant + ".");
                        }

View on GitHub (pinned to d6d39ce1c6)