flowable/flowable-engine · error · FlowableException
No event definition found for event key ${sendEventServiceTa
Error message
No event definition found for event key ${sendEventServiceTask.getEventType()} for ${execution} What it means
SendEventTaskActivityBehavior.getEventModel throws this when the event registry has no event definition matching the task's eventType and tenant. Without an EventModel, the send event task has nothing to send and Flowable aborts the execution.
Source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/SendEventTaskActivityBehavior.java:165
} else if ( (sendSynchronously && !executedAsAsyncJob)
|| (!sendEventServiceTask.isTriggerable() && executedAsAsyncJob)) {
// If this send task is specifically marked to send synchronously and is not triggerable then leave
leave(execution);
}
}
protected EventModel getEventModel(CommandContext commandContext, DelegateExecution execution) {
EventModel eventModel = null;
if (Objects.equals(ProcessEngineConfiguration.NO_TENANT_ID, execution.getTenantId())) {
eventModel = CommandContextUtil.getEventRepositoryService(commandContext)
.getEventModelByKey(sendEventServiceTask.getEventType());
} else {
eventModel = CommandContextUtil.getEventRepositoryService(commandContext)
.getEventModelByKey(sendEventServiceTask.getEventType(), execution.getTenantId());
}
if (eventModel == null) {
throw new FlowableException("No event definition found for event key " + sendEventServiceTask.getEventType() + " for " + execution);
}
return eventModel;
}
protected boolean isSendOnSystemChannel(DelegateExecution execution) {
List<ExtensionElement> systemChannels = execution.getCurrentFlowElement().getExtensionElements().getOrDefault("systemChannel", Collections.emptyList());
return !systemChannels.isEmpty();
}
protected List<ChannelModel> getChannelModels(CommandContext commandContext, DelegateExecution execution, boolean sendOnSystemChannel) {
List<String> channelKeys = new ArrayList<>();
Map<String, List<ExtensionElement>> extensionElements = execution.getCurrentFlowElement().getExtensionElements();
if (extensionElements != null) {
List<ExtensionElement> channelKeyElements = extensionElements.get("channelKey");
if (channelKeyElements != null && !channelKeyElements.isEmpty()) {
String channelKey = channelKeyElements.get(0).getElementText();
if (StringUtils.isNotEmpty(channelKey)) {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Verify the eventType in the BPMN matches the deployed event definition key exactly (case-sensitive)
- Deploy the event definition (event registry JSON artifact) in the same deployment as the process
- Check tenant handling: ensure the event definition is deployed for the tenant of the running execution, or use a tenant-less deployment
- List event definitions via EventRepositoryService.getEventModelsByKeysAndTenantId to confirm what is actually deployed
Example fix
// before <sendEvent eventType="orderShipped"/> <!-- event key not deployed --> // after <sendEvent eventType="orderShippedEvent"/> <!-- matches deployed event registry key -->
Defensive patterns
Strategy: validation
Validate before calling
// Check deployment of event definition for the tenant before starting the process
EventRepositoryService ers = CommandContextUtil.getEventRepositoryService(commandContext);
if (ers.getEventModelByKey(eventType, tenantId) == null) {
throw new IllegalStateException("Event definition missing for tenant " + tenantId + ": " + eventType);
} Try / catch
try {
processEngine.getRuntimeService().startProcessInstanceByKey(processKey);
} catch (FlowableException e) {
if (e.getMessage().contains("No event definition found for event key")) {
// deploy event registry artifact or fix eventType
}
} Prevention
- Deploy event registry JSON artifacts together with BPMN
- Keep eventType keys in a shared constants class used by both BPMN and event definitions
- Verify tenant-aware deployments in multi-tenant setups
When it happens
Trigger: A send event task whose eventType attribute references an event definition key that is not deployed (or not deployed for the execution's tenant) at the moment the task executes, since getEventModelByKey(eventType, tenantId) returns null.
Common situations: Multi-tenant deployments where the event definition exists for tenant A but the process runs as tenant B; forgetting to deploy the event registry artifact alongside the process; renaming the event key in the event definition JSON without updating the BPMN.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- No event definition found for key '${eventDefinitionKey} for
- Could not find deployment with id <deploymentId>
- EventRegistryEventDefinition on '" + elementId + "' has an e
- Merge mode '' not found.
- Could not find deployment with id
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/3eeeda272900af8e.
Report an issue: GitHub.