flowable/flowable-engine · error · FlowableIllegalArgumentException

executionId is null

Error message

executionId is null

What it means

GetDataObjectsCmd retrieves all data objects for an execution. It validates executionId first; a null id throws FlowableIllegalArgumentException. Unlike the single-object command, this one has no name argument, so the execution id is the only required input checked up front.

Solutions

  1. Validate the execution id before calling getDataObjects
  2. Skip entries with null ids in loops rather than invoking the API
  3. Resolve ids from runtimeService.createExecutionQuery() results only
  4. Fix upstream mapping code that produces null ids

Example fix

// before
Map<String, DataObject> all = runtimeService.getDataObjects(executionId); // null
// after
if (executionId != null) {
    Map<String, DataObject> all = runtimeService.getDataObjects(executionId);
}
Defensive patterns

Strategy: validation

Validate before calling

if (executionId == null) return Collections.emptyMap();
Map<String, DataObject> all = runtimeService.getDataObjects(executionId);

Type guard

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

Prevention

When it happens

Trigger: runtimeService.getDataObjects(null) or getDataObjectsLocal(null, ...) ; an execution id variable left uninitialized in batch/read code; generics or helper wrappers passing through null ids.

Common situations: Report/listing tools iterating process instances where an entry lacks an execution id; error-prone result mapping from a previous query returning null rows.

Related errors


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

Appendix: source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/GetDataObjectsCmd.java:71

        this.executionId = executionId;
        this.dataObjectNames = dataObjectNames;
        this.isLocal = isLocal;
    }

    public GetDataObjectsCmd(String executionId, Collection<String> dataObjectNames, boolean isLocal, String locale, boolean withLocalizationFallback) {
        this.executionId = executionId;
        this.dataObjectNames = dataObjectNames;
        this.isLocal = isLocal;
        this.locale = locale;
        this.withLocalizationFallback = withLocalizationFallback;
    }

    @Override
    public Map<String, DataObject> execute(CommandContext commandContext) {

        // Verify existence of execution
        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);
        }

        Map<String, VariableInstance> variables = null;

        if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, execution.getProcessDefinitionId())) {
            Flowable5CompatibilityHandler compatibilityHandler = Flowable5Util.getFlowable5CompatibilityHandler();
            variables = compatibilityHandler.getExecutionVariableInstances(executionId, dataObjectNames, isLocal);

        } else {

            if (dataObjectNames == null || dataObjectNames.isEmpty()) {
                // Fetch all

View on GitHub (pinned to d6d39ce1c6)