flowable/flowable-engine · error · FlowableIllegalArgumentException

Provided status is null

Error message

Provided status is null

What it means

Fluent-setter validation in BatchQueryImpl.status: the REST/service query builder rejects a null status filter because it would be indistinguishable from 'not set'. Callers filtering batches by status must supply a non-null status string.

Solutions

  1. Null-check the status string before calling status()
  2. Only apply the filter when a concrete status is chosen
  3. Use Batch's defined status constants rather than raw nullable strings

Example fix

// before
query.status(request.getStatus());
// after
if (request.getStatus() != null) {
    query.status(request.getStatus());
}
Defensive patterns

Strategy: validation

Validate before calling

if (status != null) {
    query.status(status);
}

Try / catch

try {
    query.status(status);
} catch (FlowableIllegalArgumentException e) {
    // treat as 'all statuses'
}

Prevention

When it happens

Trigger: Calling BatchService.createBatchQuery().status(null).

Common situations: Mapping an optional status filter from an API request where 'all statuses' is represented as null instead of skipping the filter.

Related errors


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

Appendix: source

Thrown at modules/flowable-batch-service/src/main/java/org/flowable/batch/service/impl/BatchQueryImpl.java:149

            throw new FlowableIllegalArgumentException("Provided date is null");
        }
        this.completeTimeHigherThan = date;
        return this;
    }

    @Override
    public BatchQuery completeTimeLowerThan(Date date) {
        if (date == null) {
            throw new FlowableIllegalArgumentException("Provided date is null");
        }
        this.completeTimeLowerThan = date;
        return this;
    }
    
    @Override
    public BatchQuery status(String status) {
        if (status == null) {
            throw new FlowableIllegalArgumentException("Provided status is null");
        }
        this.status = status;
        return this;
    }
    
    @Override
    public BatchQuery tenantId(String tenantId) {
        if (tenantId == null) {
            throw new FlowableIllegalArgumentException("Provided tenant id is null");
        }
        this.tenantId = tenantId;
        return this;
    }

    @Override
    public BatchQuery tenantIdLike(String tenantIdLike) {
        if (tenantIdLike == null) {
            throw new FlowableIllegalArgumentException("Provided tenant id is null");

View on GitHub (pinned to d6d39ce1c6)