flowable/flowable-engine · error · ActivitiException
Error while sending signal for event subscription '${eventSu
Error message
Error while sending signal for event subscription '${eventSubscription.getId()}': no activity associated with event subscription. Hint: The activityId of this event should be present in the BPMN. What it means
When an event (signal/message) subscription fires, AbstractEventHandler signals the execution at the subscription's activity. If the activity resolved from the subscription's activityId is null — the BPMN no longer contains that activity — the handler throws ActivitiException instead of delivering the signal.
Source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/event/AbstractEventHandler.java:42
import org.activiti.engine.impl.persistence.entity.ExecutionEntity;
import org.activiti.engine.impl.pvm.process.ActivityImpl;
import org.flowable.common.engine.impl.interceptor.EngineConfigurationConstants;
import org.flowable.engine.impl.delegate.ActivityBehavior;
/**
* @author Daniel Meyer
* @author Falko Menge
*/
public abstract class AbstractEventHandler implements EventHandler {
@Override
public void handleEvent(EventSubscriptionEntity eventSubscription, Object payload, CommandContext commandContext) {
ExecutionEntity execution = eventSubscription.getExecution();
ActivityImpl activity = eventSubscription.getActivity();
if (activity == null) {
throw new ActivitiException("Error while sending signal for event subscription '" + eventSubscription.getId() + "': "
+ "no activity associated with event subscription. Hint: The activityId of this event should be present in the BPMN.");
}
if (payload instanceof Map) {
@SuppressWarnings("unchecked")
Map<String, Object> processVariables = (Map<String, Object>) payload;
execution.setVariables(processVariables);
}
ActivityBehavior activityBehavior = activity.getActivityBehavior();
if (activityBehavior instanceof BoundaryEventActivityBehavior
|| activityBehavior instanceof EventSubProcessStartEventActivityBehavior) {
try {
dispatchActivitiesCanceledIfNeeded(eventSubscription, execution, activity, commandContext);
activityBehavior.execute(execution);
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Redeploy the process definition so the activityId referenced by the subscription exists in the BPMN
- Delete or migrate stale event subscriptions (runtimeService.createEventSubscriptionQuery()...delete / migration) before signaling
- Corrupt-process-data-fix: verify the event subscription's activityId matches an element id in the current BPMN XML
Defensive patterns
Strategy: validation
Validate before calling
EventSubscription sub = runtimeService.createEventSubscriptionQuery()
.subscriptionId(id).singleResult();
if (sub == null || sub.getActivityId() == null) {
throw new IllegalStateException("Subscription has no resolvable activity");
} Type guard
boolean isSignalable(EventSubscriptionEntity s) {
return s.getActivity() != null;
} Try / catch
try {
runtimeService.signalEventReceived(signalName);
} catch (ActivitiException e) {
if (e.getMessage() != null && e.getMessage().contains("no activity associated")) {
// redeploy definition / delete stale subscription
}
} Prevention
- Keep activityId of events stable across process model redeployments
- Clean up event subscriptions of old deployments before changing BPMN element ids
- Use process instance migration when redefining running instances
When it happens
Trigger: handleEvent invoked for an EventSubscriptionEntity whose getActivity() returns null: the subscription references an activityId missing from the deployed process definition (changed/deleted BPMN, stale subscription from an older deployment).
Common situations: Redeploying a process model where an event-bound activity (boundary event, intermediate catch) was renamed or removed while subscriptions from old instances remain; signaling via runtimeService.signalEventReceived for a stale subscription.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- Error while sending signal for " + eventSubscription + ": no
- Invalid signal handling: no execution nor process definition
- Plan item instance for {eventSubscription} can not be found
- Cannot deploy process definition '${processDefinition.getRes
- Cannot throw process-instance scoped signal, since the dispa
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/db7ad85030f2d9a8.
Report an issue: GitHub.