* Validates HttpEndpoint path before publishing workflow * Updated behaviour of mediator apis and implemented validation for workflow path * Implement default strategy option * Update mediator service names * Return validation errors as 400 BadRequest --------- Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
22 lines
831 B
C#
22 lines
831 B
C#
using Elsa.Extensions;
|
|
using Elsa.Mediator.Contracts;
|
|
using Elsa.Workflows.Runtime.Contracts;
|
|
using Elsa.Workflows.Runtime.Notifications;
|
|
|
|
namespace Elsa.Workflows.Runtime.Services;
|
|
|
|
/// <summary>
|
|
/// Relies on the <see cref="INotificationSender"/> to synchronously publish the received request as a domain event.
|
|
/// </summary>
|
|
public class SynchronousTaskDispatcher : ITaskDispatcher
|
|
{
|
|
private readonly INotificationSender _notificationSender;
|
|
|
|
/// <summary>
|
|
/// Constructor.
|
|
/// </summary>
|
|
public SynchronousTaskDispatcher(INotificationSender notificationSender) => _notificationSender = notificationSender;
|
|
|
|
/// <inheritdoc />
|
|
public async Task DispatchAsync(RunTaskRequest request, CancellationToken cancellationToken = default) => await _notificationSender.SendAsync(request, cancellationToken);
|
|
} |