using Elsa.Workflows.Runtime.Activities;
namespace Elsa.Workflows.Runtime.Services;
///
/// Publishes events using the workflow runtime, effectively triggering all activities.
///
public interface IEventPublisher
{
///
/// Synchronously publishes the specified event using the workflow runtime, effectively triggering all activities matching the provided event name.
///
Task PublishAsync(string eventName, string? correlationId = default, IDictionary? input = default, CancellationToken cancellationToken = default);
///
/// Asynchronously publishes the specified event using the workflow dispatcher.
///
Task DispatchAsync(string eventName, string? correlationId = default, IDictionary? input = default, CancellationToken cancellationToken = default);
}