flowable/flowable-engine · error · FlowableIllegalArgumentException
Deployment id is null
Error message
Deployment id is null
What it means
FlowableIllegalArgumentException thrown by CmmnDeploymentQueryImpl.deploymentId when the deploymentId argument is null. The query API requires a concrete deployment id to filter CMMN deployments; null cannot be translated into a SQL filter. It is fail-fast argument validation on the query builder.
Solutions
- Ensure a valid, non-null deployment id is available before querying
- Look up the id via a deployment query or process variable first and check for null
- Skip the deploymentId filter if filtering by id is optional in your logic
Example fix
// before
CmmnDeployment d = repoService.createDeploymentQuery().deploymentId(request.getParameter("id")).singleResult();
// after
String id = request.getParameter("id");
if (id != null) { CmmnDeployment d = repoService.createDeploymentQuery().deploymentId(id).singleResult(); } Defensive patterns
Strategy: validation
Validate before calling
Objects.requireNonNull(deploymentId, "deploymentId required");
Type guard
static boolean validDeploymentId(String id) { return id != null && !id.trim().isEmpty(); } Try / catch
try {
query.deploymentId(deploymentId);
} catch (FlowableIllegalArgumentException e) {
if ("Deployment id is null".equals(e.getMessage())) {
throw new IllegalArgumentException("A non-null deployment id is required", e);
}
throw e;
} Prevention
- Resolve ids through typed handles (CmmnDeployment objects) instead of raw nullable strings
- Check that path variables/request params are present before querying
- Guard optional filters: only call deploymentId() when the id exists
- Add unit tests covering null-id query paths
When it happens
Trigger: Calling cmmnRepositoryService.createDeploymentQuery().deploymentId(null), often because the id came from a variable/request parameter/lookup that was null.
Common situations: Reading a deployment id from a request or configuration that was not set, chaining a query after a failed lookup returned null, wiring bugs passing uninitialized fields.
Related errors
- Deployment ids 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/b714ae30b2236986.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CmmnDeploymentQueryImpl.java:63
protected String parentDeploymentIdLike;
protected List<String> parentDeploymentIds;
protected boolean latest;
public CmmnDeploymentQueryImpl() {
}
public CmmnDeploymentQueryImpl(CommandContext commandContext) {
super(commandContext);
}
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");View on GitHub (pinned to d6d39ce1c6)