flowable/flowable-engine · error · ActivitiIllegalArgumentException

executionId is null

Error message

executionId is null

What it means

Base-class validation in NeedsActiveExecutionCmd.execute(): executionId must be non-null before the command can load the execution. Subclasses (e.g. trigger, signal-related commands) rely on an execution id, and a null id fails fast with ActivitiIllegalArgumentException.

Solutions

  1. Pass a valid executionId obtained from an execution query
  2. Validate the id before calling trigger/signal-style APIs
  3. Fix the upstream lookup that produced the null id

Example fix

// before
runtimeService.trigger(executionId, variables);
// after
if (executionId == null) throw new IllegalArgumentException("executionId required");
runtimeService.trigger(executionId, variables);
Defensive patterns

Strategy: validation

Validate before calling

if (executionId == null) throw new IllegalArgumentException("executionId required");

Try / catch

try { runtimeService.trigger(executionId); } catch (ActivitiIllegalArgumentException e) { log.error("trigger called with null executionId"); throw e; }

Prevention

When it happens

Trigger: runtimeService.trigger(null), or any subclass command (e.g. TriggerExecutionCmd) constructed with a null executionId; call sites passing variables/ids from maps or headers that are null.

Common situations: Correlation data missing the execution id; variable lookup returned null and was passed straight through; refactored API call omitted the id.

Related errors


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

Appendix: source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/cmd/NeedsActiveExecutionCmd.java:41

import org.activiti.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 ActivitiIllegalArgumentException("executionId is null");
        }

        ExecutionEntity execution = commandContext
                .getExecutionEntityManager()
                .findExecutionById(executionId);

        if (execution == null) {
            throw new ActivitiObjectNotFoundException("execution " + executionId + " doesn't exist", Execution.class);
        }

        if (execution.isSuspended()) {
            throw new ActivitiException(getSuspendedExceptionMessage());
        }

        return execute(commandContext, execution);
    }

    /**

View on GitHub (pinned to d6d39ce1c6)