| | | 1 | | using Elsa.Workflows.Runtime.Requests; |
| | | 2 | | using Elsa.Workflows.Runtime.Responses; |
| | | 3 | | |
| | | 4 | | // ReSharper disable once CheckNamespace |
| | | 5 | | namespace Elsa.Workflows.Runtime.Contracts; |
| | | 6 | | |
| | | 7 | | /// <summary> |
| | | 8 | | /// Provides a set of extension methods for <see cref="IWorkflowDispatcher"/>. |
| | | 9 | | /// </summary> |
| | | 10 | | public static class WorkflowDispatcherExtensions |
| | | 11 | | { |
| | | 12 | | /// <summary> |
| | | 13 | | /// Dispatches a request to execute the specified workflow definition. |
| | | 14 | | /// </summary> |
| | | 15 | | public static Task<DispatchWorkflowResponse> DispatchAsync(this IWorkflowDispatcher workflowDispatcher, DispatchWork |
| | | 16 | | { |
| | 4 | 17 | | return workflowDispatcher.DispatchAsync(request, new(), cancellationToken); |
| | | 18 | | } |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// Dispatches a request to execute the specified workflow instance. |
| | | 22 | | /// </summary> |
| | | 23 | | public static Task<DispatchWorkflowResponse> DispatchAsync(this IWorkflowDispatcher workflowDispatcher, DispatchWork |
| | | 24 | | { |
| | 0 | 25 | | return workflowDispatcher.DispatchAsync(request, new(), cancellationToken); |
| | | 26 | | } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Starts all workflows and resumes existing workflow instances based on the specified activity type and bookmark p |
| | | 30 | | /// </summary> |
| | | 31 | | public static Task<DispatchWorkflowResponse> DispatchAsync(this IWorkflowDispatcher workflowDispatcher, DispatchTrig |
| | | 32 | | { |
| | 0 | 33 | | return workflowDispatcher.DispatchAsync(request, new(), cancellationToken); |
| | | 34 | | } |
| | | 35 | | |
| | | 36 | | /// <summary> |
| | | 37 | | /// Resumes the workflow waiting for the specified bookmark. |
| | | 38 | | /// </summary> |
| | | 39 | | public static Task<DispatchWorkflowResponse> DispatchAsync(this IWorkflowDispatcher workflowDispatcher, DispatchResu |
| | | 40 | | { |
| | 0 | 41 | | return workflowDispatcher.DispatchAsync(request, new(), cancellationToken); |
| | | 42 | | } |
| | | 43 | | } |