flowable/flowable-engine · error · FlowableIllegalArgumentException

Provided date is null

Error message

Provided date is null

What it means

ExternalWorkerJobQueryImpl.duedateHigherThan(Date) rejects a null date because a null would yield an invalid comparison predicate on DUEDATE_. Flowable validates query filter arguments eagerly and throws FlowableIllegalArgumentException. The intent is to fail at query-construction time rather than at SQL execution.

Solutions

  1. Compute a concrete Date (e.g. new Date()) before building the query
  2. Only call duedateHigherThan(date) when date != null, otherwise skip the filter
  3. Fix the date parsing upstream (use explicit DateTimeFormatter) so null never reaches the query
  4. Return a validation error to the user when the cutoff date input is missing

Example fix

// before
Date cutoff = parseSafely(input); // null on bad input
query.duedateHigherThan(cutoff);
// after
Date cutoff = parseSafely(input);
if (cutoff != null) {
    query.duedateHigherThan(cutoff);
}
Defensive patterns

Strategy: validation

Validate before calling

Objects.requireNonNull(date, "duedateHigherThan requires a non-null date");
externalWorkerJobQuery.duedateHigherThan(date);

Type guard

boolean isPresent(Date d) { return d != null; }

Prevention

When it happens

Trigger: Calling duedateHigherThan(null), e.g. a deadline computed from a missing timestamp field or a parsed date that failed to parse and left null.

Common situations: Dashboard queries filtering jobs due after a configurable cutoff; date parsing failures silently producing null; timezone/locale parsing bugs.

Related errors


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

Appendix: source

Thrown at modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/ExternalWorkerJobQueryImpl.java:420

    }

    @Override
    public ExternalWorkerJobQuery handlerTypes(Collection<String> handlerTypes) {
        if (handlerTypes == null) {
            throw new FlowableIllegalArgumentException("Provided handlerTypes are null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.handlerTypes = handlerTypes;
        } else {
            this.handlerTypes = handlerTypes;
        }
        return this;
    }

    @Override
    public ExternalWorkerJobQuery duedateHigherThan(Date date) {
        if (date == null) {
            throw new FlowableIllegalArgumentException("Provided date is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.duedateHigherThan = date;
        } else {
            this.duedateHigherThan = date;
        }
        return this;
    }

    @Override
    public ExternalWorkerJobQuery duedateLowerThan(Date date) {
        if (date == null) {
            throw new FlowableIllegalArgumentException("Provided date is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.duedateLowerThan = date;
        } else {
            this.duedateLowerThan = date;

View on GitHub (pinned to d6d39ce1c6)