flowable/flowable-engine · error · FlowableObjectNotFoundException

No decision found for key <decisionKey>. There was also no f

Error message

No decision found for key <decisionKey>. There was also no fall back decision found without tenant.

What it means

Tenant fallback path where the DefaultTenantProvider returns an empty tenant: Flowable looks up the latest decision by key with no tenant filter, and if none is found throws FlowableObjectNotFoundException stating there was no fall back decision without tenant.

Source

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

            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.findLatestDecisionByKeyAndTenantId(decisionKey, tenantId);

                if (decision == null) {
                    // if fallback to default tenant is enabled do a final lookup query
                    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);
                            }
                            
                        } else {
                            decision = decisionEntityManager.findLatestDecisionByKey(decisionKey);
                            if (decision == null) {
                                throw new FlowableObjectNotFoundException("No decision found for key: " + decisionKey +
                                    ". There was also no fall back decision table found without tenant.");
                            }
                        }
                        
                    } else {
                        throw new FlowableObjectNotFoundException("No decision found for key: " + decisionKey +
                            ", parent deployment id " + parentDeploymentId + " and tenant id: " + tenantId +
                            ". There was also no fall back decision found without parent deployment id.");
                    }
                }
            }
            
        } else if (StringUtils.isNotEmpty(decisionKey) && StringUtils.isNotEmpty(parentDeploymentId) &&
                        !dmnEngineConfiguration.isAlwaysLookupLatestDefinitionVersion()) {
            
            List<DmnDeployment> dmnDeployments = CommandContextUtil.getDeploymentEntityManager().findDeploymentsByQueryCriteria(
                new DmnDeploymentQueryImpl().parentDeploymentId(parentDeploymentId));

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Deploy the DMN file so the decision exists for the key (unscoped or in the expected tenant)
  2. Verify the exact decision key with a repository query (createDecisionQuery().decisionKey(...))
  3. Check why the DefaultTenantProvider returns empty and fix it if a specific tenant was intended
  4. Confirm you are connected to the database/schema where the deployment occurred

Example fix

// before
dmnEngine.execute("decisonKey", vars); // typo
// after
dmnEngine.execute("decisionKey", vars); // matches deployed decision id/key
Defensive patterns

Strategy: try-catch

Validate before calling

Decision d = dmnRepositoryService.createDecisionQuery()
    .decisionKey(decisionKey).singleResult();
if (d == null) throw new IllegalStateException("decision not deployed: " + decisionKey);

Try / catch

try { dmnEngine.executeDecisionByKey(tenantId, decisionKey, vars); }
catch (FlowableObjectNotFoundException e) {
  LOG.warn("no decision and no tenant-less fallback for key {}", decisionKey);
  // deploy DMN or fix tenant provider
}

Prevention

When it happens

Trigger: resolveDefinition: fallback enabled, getDefaultTenant returned empty, and findLatestDecisionByKey(decisionKey) returned null.

Common situations: Decision not deployed at all; decision key typo; a tenant-filtered context (e.g. executing within a tenant-scoped command) with fallback enabled but the key never deployed tenant-agnostically.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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