flowable/flowable-engine · error · FlowableIllegalArgumentException

Provided element name is null

Error message

Provided element name is null

What it means

Flowable's TimerJobQueryImpl.elementName(String) throws FlowableIllegalArgumentException when the element name filter is null. The query API validates filter values as they are assigned, so null names are rejected immediately rather than producing a broken query. Note this filters on the element's name attribute, distinct from elementId.

Solutions

  1. Only call elementName when a non-null name is available; otherwise skip the filter
  2. Null-check the source element/name before applying the filter
  3. Add name attributes to relevant BPMN elements if names are required
  4. Catch FlowableIllegalArgumentException to return a clear invalid-filter message

Example fix

// before
query.elementName(flowElement.getName());
// after
String name = flowElement != null ? flowElement.getName() : null;
if (name != null) {
    query.elementName(name);
}
Defensive patterns

Strategy: validation

Validate before calling

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

Type guard

boolean hasElementName(FlowElement e) { return e != null && e.getName() != null; }

Try / catch

try { query.elementName(elName); } catch (FlowableIllegalArgumentException e) { log.warn("Null element name filter", e); }

Prevention

When it happens

Trigger: Calling createTimerJobQuery().elementName(null), e.g. when the name is read from a BPMN element lacking a name attribute or from a nullable i18n/localized value.

Common situations: BPMN diagrams where timer boundary events have no name attribute; queries built from localized labels that are absent; passing null intending to 'clear' the filter (unsupported).

Related errors


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

Appendix: source

Thrown at modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/TimerJobQueryImpl.java:225

    }

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

    @Override
    public TimerJobQueryImpl elementName(String elementName) {
        if (elementName == null) {
            throw new FlowableIllegalArgumentException("Provided element name is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.elementName = elementName;
        } else {
            this.elementName = elementName;
        }
        return this;
    }

    @Override
    public TimerJobQueryImpl scopeId(String scopeId) {
        if (scopeId == null) {
            throw new FlowableIllegalArgumentException("Provided scope id is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.scopeId = scopeId;
        } else {
            this.scopeId = scopeId;

View on GitHub (pinned to d6d39ce1c6)