{"record":{"id":"932ea2e3df6f07da","repo":"flowable/flowable-engine","slug":"provided-element-name-is-null-932ea2","errorCode":null,"errorMessage":"Provided element name is null","messagePattern":"Provided element name is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/TimerJobQueryImpl.java","lineNumber":225,"sourceCode":"    }\n\n    @Override\n    public TimerJobQuery elementIds(Collection<String> elementIds) {\n        if (elementIds == null) {\n            throw new FlowableIllegalArgumentException(\"Provided element ids are null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.elementIds = elementIds;\n        } else {\n            this.elementIds = elementIds;\n        }\n        return this;\n    }\n\n    @Override\n    public TimerJobQueryImpl elementName(String elementName) {\n        if (elementName == null) {\n            throw new FlowableIllegalArgumentException(\"Provided element name is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.elementName = elementName;\n        } else {\n            this.elementName = elementName;\n        }\n        return this;\n    }\n\n    @Override\n    public TimerJobQueryImpl scopeId(String scopeId) {\n        if (scopeId == null) {\n            throw new FlowableIllegalArgumentException(\"Provided scope id is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.scopeId = scopeId;\n        } else {\n            this.scopeId = scopeId;","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/TimerJobQueryImpl.java#L207-L243","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Only call elementName when a non-null name is available; otherwise skip the filter","Null-check the source element/name before applying the filter","Add name attributes to relevant BPMN elements if names are required","Catch FlowableIllegalArgumentException to return a clear invalid-filter message"],"exampleFix":"// before\nquery.elementName(flowElement.getName());\n// after\nString name = flowElement != null ? flowElement.getName() : null;\nif (name != null) {\n    query.elementName(name);\n}","handlingStrategy":"validation","validationCode":"if (elementName != null) { query.elementName(elementName); }","typeGuard":"boolean hasElementName(FlowElement e) { return e != null && e.getName() != null; }","tryCatchPattern":"try { query.elementName(elName); } catch (FlowableIllegalArgumentException e) { log.warn(\"Null element name filter\", e); }","preventionTips":["Remember BPMN name attributes are optional; null-check before filtering","Filter by elementId when names may be missing","Skip optional filters conditionally instead of passing null","Validate localized/name sources before building queries"],"tags":["flowable","null-check","query-api","bpmn-element"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}