flowable/flowable-engine · error · FlowableObjectNotFoundException

Could not find decision service with id

Error message

Could not find decision service with id: ${decisionId}

What it means

Thrown by DecisionUtil.getDecisionService when a DmnDefinition was resolved for the given decision id, but the definition contains no DecisionService with that id. This is a FlowableObjectNotFoundException indicating the requested decision service does not exist in the deployed DMN definition.

Solutions

  1. Verify the decisionId matches a decision service id in the deployed DMN XML (inspect the <decisionService> element).
  2. Redeploy a corrected DMN definition that includes the decision service for this decision.
  3. Check you are querying the correct deployment/definition version (latest vs. specific id).
  4. Catch FlowableObjectNotFoundException and fall back to listing available decision services for diagnosis.

Example fix

// before
DecisionService svc = DecisionUtil.getDecisionService("my-decision");
// after
DmnDefinition def = DecisionUtil.getDmnDefinitionByDecisionId("my-decision");
if (def.getDecisionServiceById("my-decision") == null) {
    throw new IllegalStateException("DMN model must define a decision service containing decision 'my-decision'");
}
DecisionService svc = DecisionUtil.getDecisionService("my-decision");
Defensive patterns

Strategy: try-catch

Validate before calling

DmnDefinition def = dmnRepositoryService.createDmnDefinitionQuery().dmnDecisionId(decisionId).singleResult();
if (def == null) { /* abort: no such decision */ }

Try / catch

try {
    DecisionService svc = DecisionUtil.getDecisionService(decisionId);
} catch (FlowableObjectNotFoundException e) {
    logger.warn("Unknown decision service: {}", decisionId);
}

Prevention

When it happens

Trigger: Calling getDecisionService(decisionId) (e.g. via the DMN engine's decision service lookup) with an id that exists as a decision but does not map to a decision service element, or a stale/incorrect decision id.

Common situations: Deploying a DMN file where the decision is not referenced inside a decision service; querying with a decision key vs. id confusion; referencing definitions from an older deployment after redeploy.

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/c2b85161c9d98aee. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/util/DecisionUtil.java:82

        return null;
    }

    public static DecisionEntity getDecisionTableFromDatabase(String decisionTableId) {
        DecisionEntityManager decisionTableEntityManager = CommandContextUtil.getDmnEngineConfiguration().getDecisionEntityManager();
        DecisionEntity decisionTable = decisionTableEntityManager.findById(decisionTableId);
        if (decisionTable == null) {
            throw new FlowableException("No decision table found with id " + decisionTableId);
        }

        return decisionTable;
    }

    public static DecisionService getDecisionService(String decisionId) {
        DmnDefinition dmnDefinition = getDmnDefinitionByDecisionId(decisionId);
        DecisionService decisionService = dmnDefinition.getDecisionServiceById(decisionId);

        if (decisionService == null) {
            throw new FlowableObjectNotFoundException("Could not find decision service with id: " + decisionId);
        }

        return decisionService;
    }
}

View on GitHub (pinned to d6d39ce1c6)