flowable/flowable-engine · error · FlowableIllegalArgumentException

No move execution or activity ids or enable activity ids…

Error message

No move execution or activity ids or enable activity ids provided

What it means

ChangeActivityStateCmd moves a running process instance to different activities at runtime. This command requires at least one of: move execution ids, move activity ids, or enable activity ids. Flowable throws FlowableIllegalArgumentException when all three lists are empty because there is nothing to do.

Solutions

  1. Call at least one move method (e.g. moveActivityIdTo) or enableActivity on the ChangeActivityStateBuilder before changeState().
  2. Set the process instance id via changeActivityStateBuilder.processInstanceId(...) plus move/enable activity ids if using activity-id based movement.
  3. Validate before calling changeState() that at least one target activity/execution id is present.

Example fix

// before
runtimeService.createChangeActivityStateBuilder().changeState();
// after
runtimeService.createChangeActivityStateBuilder()
    .processInstanceId(processInstanceId)
    .moveActivityIdTo("currentActivity", "targetActivity")
    .changeState();
Defensive patterns

Strategy: validation

Validate before calling

if (moveExecutionIds.isEmpty() && moveActivityIds.isEmpty() && enableActivityIds.isEmpty()) {
    throw new IllegalArgumentException("Provide at least one move/enable activity or execution id");
}

Prevention

When it happens

Trigger: Calling runtimeService.createChangeActivityStateBuilder() without calling any of moveExecutionIdsToSingleActivityId(), moveExecutionIdToActivityIds(), moveActivityIdTo(), moveActivityIdsToSingleActivityId() or enableActivity(), then calling changeState().

Common situations: Building the builder conditionally from user input where none of the conditions matched; refactoring code that removed the move/enable call; passing empty collections that resulted in no ids being set on the builder.

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/5d4041d05255d4cd. Report an issue: GitHub.

Appendix: source

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

import org.flowable.engine.impl.util.CommandContextUtil;

/**
 * @author Tijs Rademakers
 */
public class ChangeActivityStateCmd implements Command<Void> {

    protected ChangeActivityStateBuilderImpl changeActivityStateBuilder;

    public ChangeActivityStateCmd(ChangeActivityStateBuilderImpl changeActivityStateBuilder) {
        this.changeActivityStateBuilder = changeActivityStateBuilder;
    }

    @Override
    public Void execute(CommandContext commandContext) {
        if (changeActivityStateBuilder.getMoveExecutionIdList().isEmpty() && changeActivityStateBuilder.getMoveActivityIdList().isEmpty()
                && changeActivityStateBuilder.getEnableActivityIdList().isEmpty()) {
            
            throw new FlowableIllegalArgumentException("No move execution or activity ids or enable activity ids provided");

        } else if ((!changeActivityStateBuilder.getMoveActivityIdList().isEmpty() || !changeActivityStateBuilder.getEnableActivityIdList().isEmpty()) && changeActivityStateBuilder.getProcessInstanceId() == null) {
            throw new FlowableIllegalArgumentException("Process instance id is required");
        }

        DynamicStateManager dynamicStateManager = CommandContextUtil.getProcessEngineConfiguration(commandContext).getDynamicStateManager();
        dynamicStateManager.moveExecutionState(changeActivityStateBuilder, commandContext);

        return null;
    }
}

View on GitHub (pinned to d6d39ce1c6)