flowable/flowable-engine · error · FlowableIllegalArgumentException
executionId is null
Error message
executionId is null
What it means
NeedsActiveExecutionCmd is the base class for commands that operate on an execution which must be active (e.g. TriggerExecutionCmd). Its execute() first validates executionId is non-null and throws FlowableIllegalArgumentException 'executionId is null' otherwise.
Solutions
- Obtain a valid execution id via runtimeService.createExecutionQuery() before invoking trigger/signal APIs.
- Null-check the execution id at the call site, especially for ids extracted from external payloads.
- If you only have the process instance id, query for the waiting execution instead of passing null.
- Catch FlowableIllegalArgumentException where null indicates 'nothing to trigger' and skip gracefully.
Example fix
// before
runtimeService.trigger(executionId); // executionId may be null
// after
if (executionId == null) {
return; // nothing waiting
}
runtimeService.trigger(executionId); Defensive patterns
Strategy: validation
Validate before calling
if (executionId == null || executionId.isBlank()) {
throw new IllegalArgumentException("executionId is required");
} Type guard
boolean isValidExecutionId(String id) { return id != null && !id.isBlank(); } Try / catch
try {
runtimeService.trigger(executionId);
} catch (FlowableIllegalArgumentException e) {
log.warn("Cannot trigger execution: {}", e.getMessage());
} Prevention
- Obtain execution ids from ExecutionQuery results, never from untrusted input
- Null-check ids deserialized from webhook/queue payloads
- Don't swap argument order in trigger/signal-style APIs
When it happens
Trigger: Calling runtimeService.trigger(null), signal/signalEventReceived with a null executionId, or any subclass command (trigger, message/event correlation) constructed with a null executionId.
Common situations: The execution id variable was never assigned (null return of an earlier query); argument order swapped in trigger-like APIs; null propagation from deserialized webhook payloads.
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
- Business key is null
- Business status is null
- bytes is null
- caseInstanceId is null
- caseInstanceId is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/ae2424f32768bce1.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/NeedsActiveExecutionCmd.java:42
import org.flowable.engine.runtime.Execution;
/**
* @author Joram Barrez
*/
public abstract class NeedsActiveExecutionCmd<T> implements Command<T>, Serializable {
private static final long serialVersionUID = 1L;
protected String executionId;
public NeedsActiveExecutionCmd(String executionId) {
this.executionId = executionId;
}
@Override
public T execute(CommandContext commandContext) {
if (executionId == null) {
throw new FlowableIllegalArgumentException("executionId is null");
}
ExecutionEntity execution = CommandContextUtil.getExecutionEntityManager(commandContext).findById(executionId);
if (execution == null) {
throw new FlowableObjectNotFoundException("execution " + executionId + " doesn't exist", Execution.class);
}
if (execution.isSuspended()) {
throw new FlowableException(getSuspendedExceptionMessagePrefix() + " a suspended " + execution);
}
return execute(commandContext, execution);
}
/**
* Subclasses should implement this method. The provided {@link ExecutionEntity} is guaranteed to be active (ie. not suspended).
*/View on GitHub (pinned to d6d39ce1c6)