flowable/flowable-engine · error · FlowableIllegalArgumentException
Deployment ids is null
Error message
Deployment ids is null
What it means
FlowableIllegalArgumentException thrown by CmmnDeploymentQueryImpl.deploymentIds when the deploymentIds list is null. The query needs a non-null list of deployment ids to build an IN filter; null is rejected instead of being treated as an empty or absent filter.
Solutions
- Ensure the list is non-null (use Collections.emptyList() if no ids) before calling
- Skip the deploymentIds() call when the list is absent, so the filter is simply not applied
- Check the upstream producer of the id list for null returns
Example fix
// before
query.deploymentIds(idsFromConfig); // may be null
// after
if (idsFromConfig != null && !idsFromConfig.isEmpty()) { query.deploymentIds(idsFromConfig); } Defensive patterns
Strategy: validation
Validate before calling
if (ids != null && !ids.isEmpty()) { query.deploymentIds(ids); } Type guard
static boolean hasDeploymentIds(List<String> ids) { return ids != null && !ids.isEmpty(); } Try / catch
try {
query.deploymentIds(ids);
} catch (FlowableIllegalArgumentException e) {
if ("Deployment ids is null".equals(e.getMessage())) {
throw new IllegalArgumentException("deploymentIds list must not be null", e);
}
throw e;
} Prevention
- Treat 'no filter' as 'skip the call', never as null argument
- Default lists to Collections.emptyList() instead of null
- Use Optional<List<String>> to make absence explicit in query-builder APIs
- Validate id collections assembled from external input
When it happens
Trigger: Calling cmmnRepositoryService.createDeploymentQuery().deploymentIds(null), typically when the id list comes from a collection that was never populated or a lookup that returned null.
Common situations: Passing a null collection assembled from external input, forgetting to initialize the list before query construction, optional filtering logic that should have skipped the call.
Related errors
- Deployment id is null
- deploymentName is null
- deploymentNameLike is null
- Business key is null
- Business status is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/3bb6e94651374a6b.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CmmnDeploymentQueryImpl.java:72
}
public CmmnDeploymentQueryImpl(CommandExecutor commandExecutor) {
super(commandExecutor);
}
@Override
public CmmnDeploymentQueryImpl deploymentId(String deploymentId) {
if (deploymentId == null) {
throw new FlowableIllegalArgumentException("Deployment id is null");
}
this.deploymentId = deploymentId;
return this;
}
@Override
public CmmnDeploymentQueryImpl deploymentIds(List<String> deploymentIds) {
if (deploymentIds == null) {
throw new FlowableIllegalArgumentException("Deployment ids is null");
}
this.deploymentIds = deploymentIds;
return this;
}
@Override
public CmmnDeploymentQueryImpl deploymentName(String deploymentName) {
if (deploymentName == null) {
throw new FlowableIllegalArgumentException("deploymentName is null");
}
this.name = deploymentName;
return this;
}
@Override
public CmmnDeploymentQueryImpl deploymentNameLike(String nameLike) {
if (nameLike == null) {
throw new FlowableIllegalArgumentException("deploymentNameLike is null");View on GitHub (pinned to d6d39ce1c6)