flowable/flowable-engine · error · FlowableException
Invalid event definition id : null
Error message
Invalid event definition id : null
What it means
findDeployedEventDefinitionById requires a non-null eventDefinitionId. When null is passed, it throws a plain FlowableException before any cache or database lookup. It is a fail-fast guard for a programming error on the caller side.
Solutions
- Ensure the caller supplies a real event definition id before invoking the lookup
- Null-check the id at the call site and return a meaningful error or skip the lookup
- Trace where the null originates (request body, DB column, process variable) and fix the producer
Example fix
// before
EventDefinitionEntity def = deploymentManager.findDeployedEventDefinitionById(request.getDefinitionId());
// after
if (request.getDefinitionId() != null) {
EventDefinitionEntity def = deploymentManager.findDeployedEventDefinitionById(request.getDefinitionId());
} Defensive patterns
Strategy: type-guard
Validate before calling
if (eventDefinitionId == null || eventDefinitionId.isEmpty()) {
throw new IllegalArgumentException("eventDefinitionId is required");
} Type guard
boolean hasDefinitionId(String id) { return id != null && !id.trim().isEmpty(); } Try / catch
try {
def = deploymentManager.findDeployedEventDefinitionById(id);
} catch (org.flowable.common.engine.api.FlowableException e) {
throw new IllegalArgumentException("event definition id must not be null", e);
} Prevention
- Null-check ids from requests/variables before lookup calls
- Make id fields required at the API boundary
- Log the origin of ids so nulls are caught early in tests
When it happens
Trigger: Calling findDeployedEventDefinitionById(null), typically because the caller obtained the id from an unset field, a null map entry, or an upstream API response that lacked the id.
Common situations: Command classes (e.g. event-registry commands using it in execute) propagating null ids from request parameters; deserialization of incomplete deployment payloads; variable/property missing in a process context.
Related errors
- Invalid channel definition id : null
- after time is null
- Business key is null
- bytes array is null
- bytes is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/4b56ec94d46846ac.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/persistence/deploy/EventDeploymentManager.java:71
protected EventDeploymentEntityManager deploymentEntityManager;
public EventDeploymentManager(DeploymentCache<EventDefinitionCacheEntry> eventDefinitionCache,
DeploymentCache<ChannelDefinitionCacheEntry> channelDefinitionCache, EventRegistryEngineConfiguration engineConfig) {
this.eventDefinitionCache = eventDefinitionCache;
this.channelDefinitionCache = channelDefinitionCache;
this.engineConfig = engineConfig;
}
public void deploy(EventDeploymentEntity deployment) {
for (Deployer deployer : deployers) {
deployer.deploy(deployment);
}
}
public EventDefinitionEntity findDeployedEventDefinitionById(String eventDefinitionId) {
if (eventDefinitionId == null) {
throw new FlowableException("Invalid event definition id : null");
}
// first try the cache
EventDefinitionCacheEntry cacheEntry = eventDefinitionCache.get(eventDefinitionId);
EventDefinitionEntity eventDefinition = cacheEntry != null ? cacheEntry.getEventDefinitionEntity() : null;
if (eventDefinition == null) {
eventDefinition = engineConfig.getEventDefinitionEntityManager().findById(eventDefinitionId);
if (eventDefinition == null) {
throw new FlowableObjectNotFoundException("no deployed event definition found with id '" + eventDefinitionId + "'");
}
eventDefinition = resolveEventDefinition(eventDefinition).getEventDefinitionEntity();
}
return eventDefinition;
}
public ChannelDefinitionEntity findDeployedChannelDefinitionById(String channelDefinitionId) {
if (channelDefinitionId == null) {View on GitHub (pinned to d6d39ce1c6)