flowable/flowable-engine · error · IllegalArgumentException

decision does not contain decision key

Error message

decision does not contain decision key

What it means

DecisionExecutionAuditUtil.initializeDecisionServiceExecutionAudit requires a DecisionService with a non-null id before creating the audit container. If the decision service object or its id is null, it logs 'decision service does not contain key' and throws IllegalArgumentException.

Solutions

  1. Set the id on the DecisionService (or deploy the correct DMN XML with an id attribute)
  2. Null-check the decision service and its id before invoking the audit util
  3. Redeploy the DMN artifact if the deployed model lacks the id

Example fix

// before
DecisionService ds = new DecisionServiceImpl(); // no id
audit = DecisionExecutionAuditUtil.initializeDecisionServiceExecutionAudit(ds, ctx);
// after
ds.setId("decision-service-1");
audit = DecisionExecutionAuditUtil.initializeDecisionServiceExecutionAudit(ds, ctx);
Defensive patterns

Strategy: validation

Validate before calling

if (decisionService == null || decisionService.getId() == null) {
  throw new IllegalArgumentException("decision service must have an id before audit init");
}

Prevention

When it happens

Trigger: Calling initializeDecisionServiceExecutionAudit with a null DecisionService, or one parsed/deployed without an id attribute, or an id that was never populated during deployment.

Common situations: Hand-built DecisionService model objects used programmatically without setting the id; malformed DMN XML missing the id attribute; an entity loaded with a partial projection lacking the id.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — 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/38d2b7a3cd78da01. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/audit/DecisionExecutionAuditUtil.java:38

import org.flowable.dmn.engine.impl.util.CommandContextUtil;
import org.flowable.dmn.model.Decision;
import org.flowable.dmn.model.DecisionService;
import org.flowable.dmn.model.DecisionTable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author Yvo Swillens
 */
public class DecisionExecutionAuditUtil {

    private static final Logger LOGGER = LoggerFactory.getLogger(DecisionExecutionAuditUtil.class);

    public static DecisionServiceExecutionAuditContainer initializeDecisionServiceExecutionAudit(DecisionService decisionService, ExecuteDecisionContext executeDecisionInfo) {

        if (decisionService == null || decisionService.getId() == null) {
            LOGGER.error("decision service does not contain key");
            throw new IllegalArgumentException("decision does not contain decision key");
        }
        
        DmnEngineConfiguration dmnEngineConfiguration = CommandContextUtil.getDmnEngineConfiguration();

        return new DecisionServiceExecutionAuditContainer(decisionService.getId(), decisionService.getName(), executeDecisionInfo.getDecisionVersion(),
                dmnEngineConfiguration.isStrictMode(), executeDecisionInfo.getVariables(), dmnEngineConfiguration.getClock().getCurrentTime());
    }

    public static DecisionExecutionAuditContainer initializeDecisionExecutionAudit(Decision decision, ExecuteDecisionContext executeDecisionInfo) {

        if (decision == null || decision.getId() == null) {
            LOGGER.error("decision does not contain key");
            throw new IllegalArgumentException("decision does not contain decision key");
        }

        DecisionTable decisionTable = (DecisionTable) decision.getExpression();

        if (decisionTable.getHitPolicy() == null) {

View on GitHub (pinned to d6d39ce1c6)