flowable/flowable-engine · error · FlowableIllegalArgumentException
deploymentId is null
Error message
deploymentId is null
What it means
SetDeploymentParentDeploymentIdCmd.execute() first validates that deploymentId is non-null and throws FlowableIllegalArgumentException otherwise. This command re-parents an event deployment (used for parent/child deployment linkage), which is impossible without an id.
Source
Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/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
EventDeploymentEntity 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)
Solutions
- Resolve the deployment id via a deployment query before invoking the command.
- Add a null check / assertion in the calling code with a descriptive error.
- Fix the pipeline so deployment creation completes and its id is propagated before re-parenting.
Example fix
// before eventRepositoryService.setDeploymentParentDeploymentId(deployId, parentDeployId); // deployId is null // after Objects.requireNonNull(deployId, "deployId must be resolved from deployment response before re-parenting"); eventRepositoryService.setDeploymentParentDeploymentId(deployId, parentDeployId);
Defensive patterns
Strategy: validation
Validate before calling
Objects.requireNonNull(deploymentId, "deploymentId required for setDeploymentParentDeploymentId"); Objects.requireNonNull(newParentDeploymentId, "newParentDeploymentId required");
Type guard
boolean canReparent(String childId, String parentId) {
return childId != null && !childId.isBlank() && parentId != null;
} Try / catch
try {
eventRepositoryService.setDeploymentParentDeploymentId(deploymentId, newParentDeploymentId);
} catch (FlowableIllegalArgumentException e) {
log.error("Null deployment id; check pipeline id propagation", e);
} Prevention
- Assert ids are non-null at pipeline stage boundaries.
- Make deploy steps fail loudly so downstream stages never get null ids.
- Prefer explicit id variables over placeholder strings in scripts.
When it happens
Trigger: Calling setDeploymentParentDeploymentId with a null deployment id, e.g. from an empty query result or an unset variable passed through the API.
Common situations: Automated deployment scripts where the deployment step was skipped or failed, leaving the id unset; misordered pipeline steps consuming an id before it is created.
Related errors
- deploymentId is null
- deploymentId is null
- Deployment id is null
- Deployment id is null
- deploymentId is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/1700839eab73ae92.
Report an issue: GitHub.