if (signalEventSubscriptionEntity.isGlobalScoped()) {
if (signalEventSubscriptionEntity.isGlobalScoped()) { signalEventSubscriptionEntity.eventReceived(payload, false);
@Override public Void execute(CommandContext commandContext) { List<SignalEventSubscriptionEntity> signalEvents = null; if (executionId == null) { signalEvents = commandContext.getEventSubscriptionEntityManager().findSignalEventSubscriptionsByEventName(eventName, tenantId); } else { ExecutionEntity execution = commandContext.getExecutionEntityManager().findExecutionById(executionId); if (execution == null) { throw new ActivitiObjectNotFoundException("Cannot find execution with id '" + executionId + "'", Execution.class); } if (execution.isSuspended()) { throw new ActivitiException("Cannot throw signal event '" + eventName + "' because execution '" + executionId + "' is suspended"); } signalEvents = commandContext.getEventSubscriptionEntityManager().findSignalEventSubscriptionsByNameAndExecution(eventName, executionId); if (signalEvents.isEmpty()) { throw new ActivitiException("Execution '" + executionId + "' has not subscribed to a signal event with name '" + eventName + "'."); } } for (SignalEventSubscriptionEntity signalEventSubscriptionEntity : signalEvents) { // We only throw the event to globally scoped signals. // Process instance scoped signals must be thrown within the process itself if (signalEventSubscriptionEntity.isGlobalScoped()) { signalEventSubscriptionEntity.eventReceived(payload, async); } } return null; }
if (signalEventSubscriptionEntity.isGlobalScoped()) {