flowable/flowable-engine · error · FlowableIllegalArgumentException
decisionKey is null
Error message
decisionKey is null
What it means
ExecuteDecisionWithAuditTrailCmd executes a decision and records an audit trail, but first rejects a null decision key with FlowableIllegalArgumentException. Same guard as ExecuteDecisionCmd because the audit-trail variant resolves the definition by the same key.
Source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/ExecuteDecisionWithAuditTrailCmd.java:59
public ExecuteDecisionWithAuditTrailCmd(String decisionKey, Map<String, Object> variables) {
super(decisionKey, variables);
}
public ExecuteDecisionWithAuditTrailCmd(String decisionKey, String parentDeploymentId, Map<String, Object> variables) {
this(decisionKey, variables);
executeDecisionContext.setParentDeploymentId(parentDeploymentId);
}
public ExecuteDecisionWithAuditTrailCmd(String decisionKey, String parentDeploymentId, Map<String, Object> variables, String tenantId) {
this(decisionKey, parentDeploymentId, variables);
executeDecisionContext.setTenantId(tenantId);
}
@Override
public Void execute(CommandContext commandContext) {
if (executeDecisionContext.getDecisionKey() == null) {
throw new FlowableIllegalArgumentException("decisionKey is null");
}
DmnDefinition definition;
try {
definition = resolveDefinition();
} catch (FlowableException e) {
DecisionExecutionAuditContainer container = new DecisionExecutionAuditContainer();
container.setFailedWithException(e);
executeDecisionContext.setDecisionExecution(container);
return null;
}
execute(commandContext, definition);
return null;
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Set a non-null decision key before executing: executeDecisionWithAuditTrail("myDecision", vars)
- Guard the key at the call site and raise an application-specific error when null
- Check any wrapper/utility class used by your project ensures the key is populated before delegating to the DMN engine
Example fix
// before
DmnDecisionTableAuditTrailInfo info = ds.executeDecisionWithAuditTrail(props.get("decisionKey"), vars);
// after
String key = (String) props.get("decisionKey");
if (key == null) throw new IllegalArgumentException("decisionKey property missing");
DmnDecisionTableAuditTrailInfo info = ds.executeDecisionWithAuditTrail(key, vars); Defensive patterns
Strategy: validation
Validate before calling
if (key == null || key.isEmpty()) throw new IllegalArgumentException("decision key is required for audited execution"); Try / catch
try { decisionService.executeDecisionWithAuditTrail(key, vars); } catch (FlowableIllegalArgumentException e) { if (e.getMessage().equals("decisionKey is null")) { log.error("Audited decision executed without key"); throw e; } throw e; } Prevention
- Validate configuration supplying the key at boot time
- Wrap audit-trail execution in a helper that enforces key presence
- Include the decision key in request DTO validation (e.g. @NotNull/@NotBlank)
When it happens
Trigger: Calling getDmnDecisionService().executeDecisionWithAuditTrail(key, vars) or building an audit-trail ExecuteDecisionContext with a null key (e.g. key variable unset, builder method not invoked).
Common situations: Audit-enabled deployments (DmnEngineConfiguration setting isEnableEvaluationsAuditTrail) where the key is provided dynamically and happens to be null; unit tests forgetting to set the key.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/7eef73076169053d.
Report an issue: GitHub.