{"record":{"id":"c4b489f305815896","repo":"flowable/flowable-engine","slug":"name-is-null-c4b489","errorCode":null,"errorMessage":"name is null","messagePattern":"name is null","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ProcessDefinitionQueryImpl.java","lineNumber":123,"sourceCode":"            throw new ActivitiIllegalArgumentException(\"categoryLike is null\");\n        }\n        this.categoryLike = categoryLike;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionCategoryNotEquals(String categoryNotEquals) {\n        if (categoryNotEquals == null) {\n            throw new ActivitiIllegalArgumentException(\"categoryNotEquals is null\");\n        }\n        this.categoryNotEquals = categoryNotEquals;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionName(String name) {\n        if (name == null) {\n            throw new ActivitiIllegalArgumentException(\"name is null\");\n        }\n        this.name = name;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionNameLike(String nameLike) {\n        if (nameLike == null) {\n            throw new ActivitiIllegalArgumentException(\"nameLike is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl deploymentId(String deploymentId) {\n        if (deploymentId == null) {\n            throw new ActivitiIllegalArgumentException(\"id is null\");","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ProcessDefinitionQueryImpl.java#L105-L141","documentation":"ProcessDefinitionQueryImpl.processDefinitionName(String) filters process definitions by their exact name. Flowable throws ActivitiIllegalArgumentException when the name is null, because the equality filter requires a non-null string value.","triggerScenarios":"Calling processDefinitionQuery.processDefinitionName(null) — usually when the process name comes from an unset variable, missing config, or a failed lookup.","commonSituations":"Runtime-driven lookups where the process name is resolved dynamically and comes back null; typos in configuration keys that leave the name field unset.","solutions":["Pass a non-null process definition name matching a deployed definition.","Null-check the name before applying the filter; skip processDefinitionName() when not filtering by name.","Use processDefinitionKey() instead if you actually identify processes by key.","Catch ActivitiIllegalArgumentException around query construction for centralized handling."],"exampleFix":"// before\nquery.processDefinitionName(config.get(\"process.name\")); // may be null\n// after\nString name = config.get(\"process.name\");\nif (name != null) {\n    query.processDefinitionName(name);\n}","handlingStrategy":"validation","validationCode":"if (processName != null && !processName.isEmpty()) {\n    query.processDefinitionName(processName);\n}","typeGuard":"boolean hasName(String n) { return n != null && !n.isEmpty(); }","tryCatchPattern":"try {\n    query.processDefinitionName(name);\n} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {\n    throw new BadRequestException(\"processDefinitionName must not be null\", e);\n}","preventionTips":["Resolve process names/keys from reliable constants or validated input, not unchecked config.","Check that config keys for process names exist at startup.","Skip name filters when the name is unknown instead of passing null."],"tags":["activiti","flowable","process-definition","null-argument"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}