flowable/flowable-engine · error · ActivitiIllegalArgumentException
name is null
Error message
name is null
What it means
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.
Source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ProcessDefinitionQueryImpl.java:123
throw new ActivitiIllegalArgumentException("categoryLike is null");
}
this.categoryLike = categoryLike;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionCategoryNotEquals(String categoryNotEquals) {
if (categoryNotEquals == null) {
throw new ActivitiIllegalArgumentException("categoryNotEquals is null");
}
this.categoryNotEquals = categoryNotEquals;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionName(String name) {
if (name == null) {
throw new ActivitiIllegalArgumentException("name is null");
}
this.name = name;
return this;
}
@Override
public ProcessDefinitionQueryImpl processDefinitionNameLike(String nameLike) {
if (nameLike == null) {
throw new ActivitiIllegalArgumentException("nameLike is null");
}
this.nameLike = nameLike;
return this;
}
@Override
public ProcessDefinitionQueryImpl deploymentId(String deploymentId) {
if (deploymentId == null) {
throw new ActivitiIllegalArgumentException("id is null");View on GitHub (pinned to d6d39ce1c6)
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.
Example fix
// before
query.processDefinitionName(config.get("process.name")); // may be null
// after
String name = config.get("process.name");
if (name != null) {
query.processDefinitionName(name);
} Defensive patterns
Strategy: validation
Validate before calling
if (processName != null && !processName.isEmpty()) {
query.processDefinitionName(processName);
} Type guard
boolean hasName(String n) { return n != null && !n.isEmpty(); } Try / catch
try {
query.processDefinitionName(name);
} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {
throw new BadRequestException("processDefinitionName must not be null", e);
} Prevention
- 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.
When it happens
Trigger: Calling processDefinitionQuery.processDefinitionName(null) — usually when the process name comes from an unset variable, missing config, or a failed lookup.
Common situations: Runtime-driven lookups where the process name is resolved dynamically and comes back null; typos in configuration keys that leave the name field unset.
Related errors
- category is null
- categoryLike is null
- categoryNotEquals is null
- process definition id is null
- process definition id is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/c4b489f305815896.
Report an issue: GitHub.