flowable/flowable-engine · error · FlowableIllegalArgumentException
deploymentId is null
Error message
deploymentId is null
What it means
SetDeploymentParentDeploymentIdCmd assigns a parent deployment id to a deployment (used for cascading deletes). Its execute method validates that deploymentId is non-null, throwing FlowableIllegalArgumentException ('deploymentId is null') otherwise, before updating entities.
Solutions
- Pass a valid non-null deployment id fetched via DmnRepositoryService.createDeploymentQuery()
- Validate arguments before constructing the command; also verify deployment existence (a null lookup follows this check)
- Fix argument ordering / initialization bugs that produced the null id
Example fix
// before
managementService.executeCommand(new SetDeploymentParentDeploymentIdCmd(deploymentId, parentId));
// after
if (deploymentId == null) throw new IllegalArgumentException("deploymentId required");
managementService.executeCommand(new SetDeploymentParentDeploymentIdCmd(deploymentId, parentId)); Defensive patterns
Strategy: validation
Validate before calling
if (deploymentId == null || deploymentId.isEmpty()) {
throw new IllegalArgumentException("deploymentId required for parent assignment");
} Type guard
boolean canSetParent(String id) { return id != null && !id.isEmpty(); } Try / catch
try {
managementService.executeCommand(new SetDeploymentParentDeploymentIdCmd(deploymentId, parentId));
} catch (FlowableIllegalArgumentException e) {
log.error("Null deploymentId in parent assignment", e);
throw new BadRequestException("deploymentId required");
} Prevention
- Validate constructor arguments before submitting engine commands
- Check deployment existence (the command also throws not-found after the null check)
- Audit cleanup scripts for nullable id sources
When it happens
Trigger: Calling the command executor with new SetDeploymentParentDeploymentIdCmd(null, newParentDeploymentId) or the corresponding management/repository API with a null deployment id.
Common situations: Programmatic deployment cleanup scripts where the deployment id variable was never assigned, deletion flows driven by data from a nullable source, or wiring mistakes passing arguments in the wrong order.
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/a933ecf2c94c2433.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/SetDeploymentParentDeploymentIdCmd.java:42
/**
* @author Tijs Rademakers
*/
public class SetDeploymentParentDeploymentIdCmd implements Command<Void>, Serializable {
private static final long serialVersionUID = 1L;
protected String deploymentId;
protected String newParentDeploymentId;
public SetDeploymentParentDeploymentIdCmd(String deploymentId, String newParentDeploymentId) {
this.deploymentId = deploymentId;
this.newParentDeploymentId = newParentDeploymentId;
}
@Override
public Void execute(CommandContext commandContext) {
if (deploymentId == null) {
throw new FlowableIllegalArgumentException("deploymentId is null");
}
// Update all entities
DmnDeploymentEntity deployment = CommandContextUtil.getDeploymentEntityManager(commandContext).findById(deploymentId);
if (deployment == null) {
throw new FlowableObjectNotFoundException("Could not find deployment with id " + deploymentId);
}
deployment.setParentDeploymentId(newParentDeploymentId);
CommandContextUtil.getDeploymentEntityManager(commandContext).update(deployment);
return null;
}
}View on GitHub (pinned to d6d39ce1c6)