flowable/flowable-engine · error · FlowableIllegalArgumentException

decisionTableId is null

Error message

decisionTableId is null

What it means

GetDmnDefinitionCmd loads a DmnDefinition by decision table id, using DecisionUtil.getDmnDefinitionByDecisionId. The command first validates that the decisionTableId passed to its constructor is not null and throws FlowableIllegalArgumentException otherwise, since a null id cannot resolve to any definition.

Solutions

  1. Pass a non-null decision table id obtained from DmnRepositoryService.createDecisionTableQuery() results
  2. Validate the id before invoking the repository API
  3. Confirm you are using the correct id kind (decision table id, not deployment or rule id)

Example fix

// before
DmnDefinition def = dmnRepositoryService.getDmnDefinition(decisionTableId);
// after
Objects.requireNonNull(decisionTableId, "decisionTableId must not be null");
DmnDefinition def = dmnRepositoryService.getDmnDefinition(decisionTableId);
Defensive patterns

Strategy: validation

Validate before calling

if (decisionTableId == null || decisionTableId.isEmpty()) {
    throw new IllegalArgumentException("decisionTableId required");
}

Type guard

boolean hasId(String id) { return id != null && !id.isEmpty(); }

Try / catch

try {
    def = dmnRepositoryService.getDmnDefinition(decisionTableId);
} catch (FlowableIllegalArgumentException e) {
    log.error("decisionTableId was null", e);
    return Optional.empty();
}

Prevention

When it happens

Trigger: Calling DmnRepositoryService.getDmnDefinition(null) or new GetDmnDefinitionCmd(null) via the command executor.

Common situations: Passing the result of a getDecisionTableById call that returned null, using a process definition id by mistake instead of a decision table id, or a variable that was never initialized.

Related errors


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

Appendix: source

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

import org.flowable.dmn.model.DmnDefinition;

/**
 * @author Joram Barrez
 */
public class GetDmnDefinitionCmd implements Command<DmnDefinition>, Serializable {

    private static final long serialVersionUID = 1L;

    protected String decisionTableId;

    public GetDmnDefinitionCmd(String decisionTableId) {
        this.decisionTableId = decisionTableId;
    }

    @Override
    public DmnDefinition execute(CommandContext commandContext) {
        if (decisionTableId == null) {
            throw new FlowableIllegalArgumentException("decisionTableId is null");
        }

        return DecisionUtil.getDmnDefinitionByDecisionId(decisionTableId);
    }
}

View on GitHub (pinned to d6d39ce1c6)