public void eventReceived(Object payload, boolean processASync) { eventReceived(payload, null, null, processASync); }
public void eventReceived(Object payload, boolean processASync) { eventReceived(payload, null, null, processASync); }
private void notifyExecutions(List<EventSubscriptionEntity> catchSignalEventSubscription) { for (EventSubscriptionEntity signalEventSubscriptionEntity : catchSignalEventSubscription) { if (isActiveEventSubscription(signalEventSubscriptionEntity)) { signalEventSubscriptionEntity.eventReceived(builder.getVariables(), false); } } }
private void notifyExecutions(List<EventSubscriptionEntity> catchSignalEventSubscription) { for (EventSubscriptionEntity signalEventSubscriptionEntity : catchSignalEventSubscription) { if (isActiveEventSubscription(signalEventSubscriptionEntity)) { signalEventSubscriptionEntity.eventReceived(builder.getVariables(), false); } } }
public void execute(EventSubscriptionJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { // lookup subscription: String eventSubscriptionId = configuration.getEventSubscriptionId(); EventSubscriptionEntity eventSubscription = commandContext.getEventSubscriptionManager() .findEventSubscriptionById(eventSubscriptionId); // if event subscription is null, ignore if(eventSubscription != null) { eventSubscription.eventReceived(null, false); } }
public void execute(EventSubscriptionJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { // lookup subscription: String eventSubscriptionId = configuration.getEventSubscriptionId(); EventSubscriptionEntity eventSubscription = commandContext.getEventSubscriptionManager() .findEventSubscriptionById(eventSubscriptionId); // if event subscription is null, ignore if(eventSubscription != null) { eventSubscription.eventReceived(null, false); } }
compensateEventSubscriptionEntity.eventReceived(null, async);
compensateEventSubscriptionEntity.eventReceived(null, async);
public void eventReceived(Object payload, boolean processASync) { eventReceived(payload, null, null, processASync); }
@Override public Void execute(CommandContext commandContext) { ensureNotNull("executionId", executionId); EventSubscriptionManager eventSubscriptionManager = commandContext.getEventSubscriptionManager(); List<EventSubscriptionEntity> eventSubscriptions = null; if (messageName != null) { eventSubscriptions = eventSubscriptionManager.findEventSubscriptionsByNameAndExecution( EventType.MESSAGE.name(), messageName, executionId, exclusive); } else { eventSubscriptions = eventSubscriptionManager.findEventSubscriptionsByExecutionAndType( executionId, EventType.MESSAGE.name(), exclusive); } ensureNotEmpty("Execution with id '" + executionId + "' does not have a subscription to a message event with name '" + messageName + "'", "eventSubscriptions", eventSubscriptions); ensureNumberOfElements("More than one matching message subscription found for execution " + executionId, "eventSubscriptions", eventSubscriptions, 1); // there can be only one: EventSubscriptionEntity eventSubscriptionEntity = eventSubscriptions.get(0); // check authorization String processInstanceId = eventSubscriptionEntity.getProcessInstanceId(); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkUpdateProcessInstanceById(processInstanceId); } eventSubscriptionEntity.eventReceived(processVariables, processVariablesLocal, null, false); return null; }
@Override public void execute(ActivityExecution execution) throws Exception { String businessKey = signalDefinition.getEventPayload().getBusinessKey(execution); VariableMap variableMap = signalDefinition.getEventPayload().getInputVariables(execution); String eventName = signalDefinition.resolveExpressionOfEventName(execution); // trigger all event subscriptions for the signal (start and intermediate) List<EventSubscriptionEntity> signalEventSubscriptions = findSignalEventSubscriptions(eventName, execution.getTenantId()); for (EventSubscriptionEntity signalEventSubscription : signalEventSubscriptions) { if (isActiveEventSubscription(signalEventSubscription)) { signalEventSubscription.eventReceived(variableMap, null, businessKey, signalDefinition.isAsync()); } } leave(execution); }
@Override public void execute(ActivityExecution execution) throws Exception { String businessKey = signalDefinition.getEventPayload().getBusinessKey(execution); VariableMap variableMap = signalDefinition.getEventPayload().getInputVariables(execution); String eventName = signalDefinition.resolveExpressionOfEventName(execution); // trigger all event subscriptions for the signal (start and intermediate) List<EventSubscriptionEntity> signalEventSubscriptions = findSignalEventSubscriptions(eventName, execution.getTenantId()); for (EventSubscriptionEntity signalEventSubscription : signalEventSubscriptions) { if (isActiveEventSubscription(signalEventSubscription)) { signalEventSubscription.eventReceived(variableMap, null, businessKey, signalDefinition.isAsync()); } } leave(execution); }
@Override public Void execute(CommandContext commandContext) { ensureNotNull("executionId", executionId); EventSubscriptionManager eventSubscriptionManager = commandContext.getEventSubscriptionManager(); List<EventSubscriptionEntity> eventSubscriptions = null; if (messageName != null) { eventSubscriptions = eventSubscriptionManager.findEventSubscriptionsByNameAndExecution( EventType.MESSAGE.name(), messageName, executionId, exclusive); } else { eventSubscriptions = eventSubscriptionManager.findEventSubscriptionsByExecutionAndType( executionId, EventType.MESSAGE.name(), exclusive); } ensureNotEmpty("Execution with id '" + executionId + "' does not have a subscription to a message event with name '" + messageName + "'", "eventSubscriptions", eventSubscriptions); ensureNumberOfElements("More than one matching message subscription found for execution " + executionId, "eventSubscriptions", eventSubscriptions, 1); // there can be only one: EventSubscriptionEntity eventSubscriptionEntity = eventSubscriptions.get(0); // check authorization String processInstanceId = eventSubscriptionEntity.getProcessInstanceId(); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkUpdateProcessInstanceById(processInstanceId); } eventSubscriptionEntity.eventReceived(processVariables, processVariablesLocal, null, false); return null; }
public void execute(DelegateExecution execution) throws Exception { businessProcess.setVariable("processName", "throwSignal-visited (was " + businessProcess.getVariable("processName") + ")"); String signalProcessInstanceId = (String) execution.getVariable("signalProcessInstanceId"); String executionId = runtimeService.createExecutionQuery().processInstanceId(signalProcessInstanceId).signalEventSubscriptionName("alert").singleResult().getId(); CommandContext commandContext = Context.getCommandContext(); List<EventSubscriptionEntity> findSignalEventSubscriptionsByEventName = commandContext .getEventSubscriptionManager() .findSignalEventSubscriptionsByNameAndExecution("alert", executionId); for (EventSubscriptionEntity signalEventSubscriptionEntity : findSignalEventSubscriptionsByEventName) { signalEventSubscriptionEntity.eventReceived(null, true); } } }
private void notifyExecutions(List<EventSubscriptionEntity> catchSignalEventSubscription) { for (EventSubscriptionEntity signalEventSubscriptionEntity : catchSignalEventSubscription) { if (isActiveEventSubscription(signalEventSubscriptionEntity)) { signalEventSubscriptionEntity.eventReceived(builder.getVariables(), false); } } }
public void execute(EventSubscriptionJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { // lookup subscription: String eventSubscriptionId = configuration.getEventSubscriptionId(); EventSubscriptionEntity eventSubscription = commandContext.getEventSubscriptionManager() .findEventSubscriptionById(eventSubscriptionId); // if event subscription is null, ignore if(eventSubscription != null) { eventSubscription.eventReceived(null, false); } }
compensateEventSubscriptionEntity.eventReceived(null, async);
@Override public Void execute(CommandContext commandContext) { ensureNotNull("executionId", executionId); EventSubscriptionManager eventSubscriptionManager = commandContext.getEventSubscriptionManager(); List<EventSubscriptionEntity> eventSubscriptions = null; if (messageName != null) { eventSubscriptions = eventSubscriptionManager.findEventSubscriptionsByNameAndExecution( EventType.MESSAGE.name(), messageName, executionId, exclusive); } else { eventSubscriptions = eventSubscriptionManager.findEventSubscriptionsByExecutionAndType( executionId, EventType.MESSAGE.name(), exclusive); } ensureNotEmpty("Execution with id '" + executionId + "' does not have a subscription to a message event with name '" + messageName + "'", "eventSubscriptions", eventSubscriptions); ensureNumberOfElements("More than one matching message subscription found for execution " + executionId, "eventSubscriptions", eventSubscriptions, 1); // there can be only one: EventSubscriptionEntity eventSubscriptionEntity = eventSubscriptions.get(0); // check authorization String processInstanceId = eventSubscriptionEntity.getProcessInstanceId(); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkUpdateProcessInstanceById(processInstanceId); } eventSubscriptionEntity.eventReceived(processVariables, processVariablesLocal, null, false); return null; }
@Override public void execute(ActivityExecution execution) throws Exception { String businessKey = signalDefinition.getEventPayload().getBusinessKey(execution); VariableMap variableMap = signalDefinition.getEventPayload().getInputVariables(execution); String eventName = signalDefinition.resolveExpressionOfEventName(execution); // trigger all event subscriptions for the signal (start and intermediate) List<EventSubscriptionEntity> signalEventSubscriptions = findSignalEventSubscriptions(eventName, execution.getTenantId()); for (EventSubscriptionEntity signalEventSubscription : signalEventSubscriptions) { if (isActiveEventSubscription(signalEventSubscription)) { signalEventSubscription.eventReceived(variableMap, null, businessKey, signalDefinition.isAsync()); } } leave(execution); }