flowable/flowable-engine · error · FlowableException

Error while sending signal for

Error message

Error while sending signal for ${eventSubscriptionEntity} no activity associated with event subscription

What it means

When an event subscription is processed asynchronously, scheduleEventAsync looks up the execution by the subscription's executionId and reads its currentFlowElement to signal the waiting activity. If the execution exists but has no current FlowElement set, Flowable cannot know which activity to signal and throws this FlowableException before scheduling the async job.

Solutions

  1. Ensure the execution is actually waiting at the event-catching activity before the event is delivered; guard signal calls against double delivery.
  2. Check for concurrent updates to the execution (use optimistic locking / proper transaction scope) so currentFlowElement is never null when the event job executes.
  3. Redeploy or repair the affected process instance if the execution state is corrupt; inspect ACT_RU_EXECUTION rows for the instance.
  4. If the wait state uses async continuation, verify the flow element is set before the async job is scheduled.

Example fix

// before: signalling blindly, possibly twice
runtimeService.signal(executionId);
runtimeService.signal(executionId);

// after: guard against duplicate signalling
if (runtimeService.createExecutionQuery().executionId(executionId).singleResult() != null) {
    runtimeService.signal(executionId);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// check the execution is waiting before signalling
Execution exec = runtimeService.createExecutionQuery()
    .executionId(executionId).singleResult();
boolean waiting = exec != null && exec.getActivityId() != null;

Try / catch

try {
    runtimeService.signal(executionId);
} catch (FlowableException e) {
    if (e.getMessage().contains("no activity associated")) {
        log.warn("Execution {} no longer waiting on event; ignoring duplicate signal", executionId);
    } else { throw e; }
}

Prevention

When it happens

Trigger: scheduleEventAsync is invoked (via eventReceived) for a subscription whose executionId resolves to an ExecutionEntity whose getCurrentFlowElement() is null — i.e. the execution is not currently parked on a flow element such as an intermediate catch event or receive task.

Common situations: Signalling an execution that already moved past the catching activity (duplicate signal); concurrent modification of the execution leaving it between elements; asynchronous continuation or transaction boundaries causing the execution's flow element to be unset when the event job runs; deleting/redeploying a process while executions wait on events.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/EventSubscriptionUtil.java:101

    protected static void scheduleEventAsync(EventSubscriptionEntity eventSubscriptionEntity, Object payload) {
        CommandContext commandContext = CommandContextUtil.getCommandContext();
        JobService jobService = CommandContextUtil.getJobService(commandContext);
        JobEntity message = jobService.createJob();
        message.setJobType(JobEntity.JOB_TYPE_MESSAGE);
        message.setJobHandlerType(ProcessEventJobHandler.TYPE);
        message.setElementId(eventSubscriptionEntity.getActivityId());
        message.setJobHandlerConfiguration(eventSubscriptionEntity.getId());
        message.setTenantId(eventSubscriptionEntity.getTenantId());
        
        String executionId = eventSubscriptionEntity.getExecutionId();
        
        if (StringUtils.isNotEmpty(executionId)) {
            ExecutionEntity execution = CommandContextUtil.getExecutionEntityManager(commandContext).findById(executionId);
            FlowNode currentFlowElement = (FlowNode) execution.getCurrentFlowElement();
    
            if (currentFlowElement == null) {
                throw new FlowableException("Error while sending signal for " + eventSubscriptionEntity + " no activity associated with event subscription");
            }
            
            EventSubscriptionUtil.processPayloadMap(payload, execution, currentFlowElement, commandContext);
        }

        jobService.scheduleAsyncJob(message);
    }
}

View on GitHub (pinned to d6d39ce1c6)