flowable/flowable-engine · error · FlowableIllegalArgumentException

no decision service with id: '<decisionKey>' found in defini

Error message

no decision service with id: '<decisionKey>' found in definition

What it means

After resolving the DMN definition, ExecuteDecisionServiceCmd looks up a DecisionService element by id within it. When no decision service with the given key exists in that definition, it throws FlowableIllegalArgumentException naming the missing key. The key is syntactically valid (non-null) but does not match anything in the deployed DMN model.

Source

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

    @Override
    public Void execute(CommandContext commandContext) {
        if (executeDecisionContext.getDecisionKey() == null) {
            throw new FlowableIllegalArgumentException("decisionKey is null");
        }

        DmnDefinition definition = resolveDefinition();

        execute(commandContext, definition);

        return null;
    }

    @Override
    protected void execute(CommandContext commandContext, DmnDefinition definition) {
        DecisionService decisionService = definition.getDecisionServiceById(executeDecisionContext.getDecisionKey());

        if (decisionService == null) {
            throw new FlowableIllegalArgumentException("no decision service with id: '" + executeDecisionContext.getDecisionKey() + "' found in definition");
        }

        executeDecisionContext.setDmnElement(decisionService);
        CommandContextUtil.getAgenda(commandContext).planExecuteDecisionServiceOperation(executeDecisionContext, decisionService);
    }
}

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Open the deployed .dmn XML and copy the exact <decisionService id="..."> value into the call
  2. Verify you are invoking executeDecisionService, not executeDecision, and that the resolved definition actually contains that decision service
  3. Redeploy the corrected DMN artifact if the model was changed, and clear stale deployments referencing the old version

Example fix

// before
decisionService.executeDecisionService("decisionService_1", vars); // id wrong
// after
decisionService.executeDecisionService("orderApprovalDecisionService", vars); // matches <decisionService id="orderApprovalDecisionService">
Defensive patterns

Strategy: try-catch

Validate before calling

DmnDefinition def = dmnRepositoryService.createDefinitionQuery().definitionKey(definitionKey).latestVersion().singleResult();
boolean hasService = def != null; // optionally inspect the model XML for <decisionService id="key">

Try / catch

try { decisionService.executeDecisionService(key, vars); } catch (FlowableIllegalArgumentException e) { if (e.getMessage().startsWith("no decision service with id")) { throw new NotFoundException("decision service " + key + " not in deployed DMN definition", e); } throw e; }

Prevention

When it happens

Trigger: executeDecisionService("someKey", vars) where someKey is not a <decisionService id=...> in the deployed DMN XML — e.g. key points to a decision table instead of a decision service, or the definition resolved under the given decision key does not contain that decision service.

Common situations: Typo or case mismatch between the code and the DMN XML id; deploying a different/older version of the .dmn file than the one the code was written against; confusing decision id with decision service id.

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