/// <summary> /// /// </summary> public virtual void Signal(SignalCmd signalCmd) { //TODO: plan is to restrict access to events using a new security policy on events // - that's another piece of work though so for now no security here runtimeService.SignalEventReceived(signalCmd.Name, signalCmd.InputVariables); eventPublisher.PublishEvent(signalCmd); }
/// <summary> /// /// </summary> public virtual void Signal(SignalCmd signalCmd) { //TODO: plan is to restrict access to events using a new security policy on events // - that's another piece of work though so for now no security here if (string.IsNullOrWhiteSpace(signalCmd.ExecutionId) == false) { runtimeService.SignalEventReceived(signalCmd.Name, signalCmd.ExecutionId, signalCmd.InputVariables); } else { runtimeService.SignalEventReceivedWithTenantId(signalCmd.Name, signalCmd.InputVariables, signalCmd.TenantId); } eventPublisher.PublishEvent(signalCmd); }
/// <summary> /// /// </summary> /// <param name="execution"></param> public override void Execute(IExecutionEntity execution) { base.Execute(execution); _ = Context.CommandContext; string eventSubscriptionName; if (signalEventName != null) { eventSubscriptionName = signalEventName; } else { eventSubscriptionName = new ExpressionManager().CreateExpression(signalExpression) .GetValue(execution).ToString(); //Expression expressionObject = commandContext.ProcessEngineConfiguration.ExpressionManager.createExpression(signalExpression); //eventSubscriptionName = expressionObject.getValue(execution).ToString(); } eventPublisher.PublishEvent(new SignalCmd(eventSubscriptionName, null)); }
protected override void HandleMessageInternal(IMessage message) { AssertUtils.ArgumentNotNull(applicationEventPublisher, "applicationEventPublisher is required"); applicationEventPublisher.PublishEvent(this, new MessagingEventArgs(message)); }
/// <summary> /// Publishes an custom event using the Spring <seealso cref="IApplicationEventPublisher"/>. This event will be caught by /// <seealso ref="IntegrationRequestSender#sendIntegrationRequest(IntegrationRequestEvent)"/> which is annotated with /// <seealso ref="TransactionalEventListener"/> on phase <seealso ref="TransactionPhase#AFTER_COMMIT"/>. </summary> /// <param name="execution"> the related execution </param> /// <param name="integrationContext"> the related integration context </param> private void PublishSpringEvent(IExecutionEntity execution, IIntegrationContextEntity integrationContext) { IntegrationRequestEvent @event = new IntegrationRequestEvent(execution, integrationContext, runtimeBundleProperties.AppName, runtimeBundleProperties.AppVersion, runtimeBundleProperties.ServiceName, runtimeBundleProperties.ServiceFullName, runtimeBundleProperties.ServiceType, runtimeBundleProperties.ServiceVersion); eventPublisher.PublishEvent(@event); }