flowable/flowable-engine · error · FlowableIllegalArgumentException
deploymentId is null
Error message
deploymentId is null
What it means
GetDeploymentResourceNamesCmd executes a command that fetches the list of resource names stored with a DMN deployment. Before querying the deployment entity manager, the command validates its constructor-supplied deploymentId and throws FlowableIllegalArgumentException when it is null. This fails fast because a null id can never match a deployment row.
Solutions
- Ensure the deploymentId string is non-null before calling getDeploymentResourceNames; load it from DmnRepositoryService.createDeploymentQuery().singleResult().getId()
- Validate the id at the call site and return a meaningful domain error instead of letting the command throw
- Check that the deployment actually exists; a null id usually means an earlier lookup failed silently
Example fix
// before
List<String> names = dmnRepositoryService.getDeploymentResourceNames(deploymentId);
// after
if (deploymentId == null || deploymentId.isEmpty()) {
throw new IllegalStateException("deploymentId must be provided");
}
List<String> names = dmnRepositoryService.getDeploymentResourceNames(deploymentId); Defensive patterns
Strategy: validation
Validate before calling
if (deploymentId == null || deploymentId.trim().isEmpty()) {
throw new IllegalArgumentException("deploymentId must be a non-empty string");
} Type guard
boolean isValidId(String id) { return id != null && !id.trim().isEmpty(); } Try / catch
try {
names = dmnRepositoryService.getDeploymentResourceNames(deploymentId);
} catch (FlowableIllegalArgumentException e) {
log.error("Missing deploymentId", e);
throw new BadRequestException("deploymentId is required");
} Prevention
- Always resolve ids via repository-service queries rather than storing them manually
- Null-check id parameters at service boundaries
- Avoid returning raw nulls from earlier lookups that feed this API
When it happens
Trigger: Calling DmnRepositoryService.getDeploymentResourceNames(null), or constructing new GetDeploymentResourceNamesCmd(null) directly and running it via the management/command executor.
Common situations: Developers passing an id obtained from a nullable API result (e.g. a deployment lookup that returned null), unmapped DTO fields, or accidentally forwarding an unset variable instead of a deployment id string.
Related errors
- Decision table id is null
- decisionTableId is null
- Deployment id is null
- deploymentId is null
- entityClass is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/8f5660c751c9befe.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/GetDeploymentResourceNamesCmd.java:38
import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.dmn.engine.impl.util.CommandContextUtil;
/**
* @author Joram Barrez
*/
public class GetDeploymentResourceNamesCmd implements Command<List<String>>, Serializable {
private static final long serialVersionUID = 1L;
protected String deploymentId;
public GetDeploymentResourceNamesCmd(String deploymentId) {
this.deploymentId = deploymentId;
}
@Override
public List<String> execute(CommandContext commandContext) {
if (deploymentId == null) {
throw new FlowableIllegalArgumentException("deploymentId is null");
}
return CommandContextUtil.getDeploymentEntityManager(commandContext).getDeploymentResourceNames(deploymentId);
}
}
View on GitHub (pinned to d6d39ce1c6)