flowable/flowable-engine · error · FlowableException

No event model found for event key ${key} for ${planItemInst

Error message

No event model found for event key ${key} for ${planItemInstanceEntity}

What it means

A send-event plan item resolves its event key to an event model via the EventRepositoryService. When no event model is deployed under that key (with or without tenant), getEventModel returns null and Flowable throws a FlowableException naming the key and plan item instance.

Source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/behavior/impl/SendEventActivityBehavior.java:89

        }

        if (sendOnSystemChannel) {
            eventRegistry.sendSystemEventOutbound(eventInstance);
        }

        CommandContextUtil.getAgenda(commandContext).planCompletePlanItemInstanceOperation(planItemInstanceEntity);
    }

    protected EventModel getEventModel(PlanItemInstanceEntity planItemInstanceEntity, String key) {
        EventModel eventModel = null;
        if (Objects.equals(CmmnEngineConfiguration.NO_TENANT_ID, planItemInstanceEntity.getTenantId())) {
            eventModel = CommandContextUtil.getEventRepositoryService().getEventModelByKey(key);
        } else {
            eventModel = CommandContextUtil.getEventRepositoryService().getEventModelByKey(key, planItemInstanceEntity.getTenantId());
        }

        if (eventModel == null) {
            throw new FlowableException("No event model found for event key " + key + " for " + planItemInstanceEntity);
        }
        return eventModel;
    }

    protected boolean isSendOnSystemChannel(PlanItemInstanceEntity planItemInstanceEntity) {
        List<ExtensionElement> systemChannels = planItemInstanceEntity.getPlanItemDefinition().getExtensionElements()
                .getOrDefault("systemChannel", Collections.emptyList());
        return !systemChannels.isEmpty();
    }

    protected List<ChannelModel> getChannelModels(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity, boolean sendOnSystemChannel) {
        List<String> channelKeys = new ArrayList<>();

        Map<String, List<ExtensionElement>> extensionElements = planItemInstanceEntity.getPlanItem().getPlanItemDefinition().getExtensionElements();
        if (extensionElements != null) {
            List<ExtensionElement> channelKeyElements = extensionElements.get("channelKey");
            if (channelKeyElements != null && !channelKeyElements.isEmpty()) {
                String channelKey = channelKeyElements.get(0).getElementText();

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Deploy the event registry model with the referenced key before starting/activating the case (EventRepositoryService.createDeployment().addClasspathResource(...).deploy())
  2. Verify the eventRef/eventRefExpression spelling against the deployed event model key
  3. If using tenants, deploy the event model for the correct tenant or ensure a shared (no-tenant) model exists
  4. Check event model key as resolved at runtime (log the key) — expression-based keys may resolve differently than expected

Example fix

// before: case references eventRef="orderEvent" but model never deployed
// after: deploy it at startup
eventRepositoryService.createDeployment()
    .addClasspathResource("event-models/orderEvent.event")
    .tenantId("acme")
    .deploy();
Defensive patterns

Strategy: validation

Validate before calling

EventModel model = eventRepositoryService.getEventModelByKey(key, tenantId);
if (model == null) {
    throw new IllegalStateException("Deploy event model with key " + key + " before starting the case");
}

Try / catch

try {
    runtimeService.triggerPlanItemInstance(eventPlanItemId);
} catch (FlowableException e) {
    if (e.getMessage().startsWith("No event model found")) {
        // extract key from message, deploy the model, retry
    }
}

Prevention

When it happens

Trigger: execute() of a send-event plan item calls getEventModel() with a key (from eventRef or eventRefExpression) that has no deployed event model, either globally or for the plan item's tenant.

Common situations: Event registry model never deployed or deployed after the case started; typo in eventRef; tenant-specific deployment missing so the tenant lookup finds nothing; event model deleted/undeployed while cases still reference it.

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


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/707d94b4cbc12b4b. Report an issue: GitHub.