| | | 1 | | using Elsa.Workflows; |
| | | 2 | | using Elsa.Workflows.Middleware.Workflows; |
| | | 3 | | using Elsa.Workflows.Pipelines.WorkflowExecution; |
| | | 4 | | using Elsa.Workflows.Runtime.Middleware.Workflows; |
| | | 5 | | |
| | | 6 | | // ReSharper disable once CheckNamespace |
| | | 7 | | namespace Elsa.Extensions; |
| | | 8 | | |
| | | 9 | | /// <summary> |
| | | 10 | | /// Provides extensions to <see cref="IWorkflowExecutionPipelineBuilder"/> that add various middleware components. |
| | | 11 | | /// </summary> |
| | | 12 | | public static class WorkflowExecutionPipelineBuilderExtensions |
| | | 13 | | { |
| | | 14 | | /// <summary> |
| | | 15 | | /// Configures the workflow execution pipeline with commonly used components. |
| | | 16 | | /// </summary> |
| | | 17 | | public static IWorkflowExecutionPipelineBuilder UseDefaultPipeline(this IWorkflowExecutionPipelineBuilder pipelineBu |
| | 522 | 18 | | pipelineBuilder |
| | 522 | 19 | | .Reset() |
| | 522 | 20 | | .UseExecutionCycleTracking() |
| | 522 | 21 | | .UseWorkflowDispatchOutbox() |
| | 522 | 22 | | .UseWorkflowHeartbeat() |
| | 522 | 23 | | .UseEngineExceptionHandling() |
| | 522 | 24 | | .UsePersistentVariables() |
| | 522 | 25 | | .UseExceptionHandling() |
| | 522 | 26 | | .UseDefaultActivityScheduler(); |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Installs middleware that persists the workflow instance before and after workflow execution. |
| | | 30 | | /// </summary> |
| | 522 | 31 | | public static IWorkflowExecutionPipelineBuilder UsePersistentVariables(this IWorkflowExecutionPipelineBuilder pipeli |
| | | 32 | | |
| | 522 | 33 | | public static IWorkflowExecutionPipelineBuilder UseWorkflowHeartbeat(this IWorkflowExecutionPipelineBuilder pipeline |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// Installs middleware that registers an <see cref="Elsa.Workflows.Runtime.ExecutionCycleHandle"/> for the duration |
| | | 37 | | /// each workflow execution cycle, so the drain orchestrator can count active executions and force-cancel them on |
| | | 38 | | /// deadline breach. |
| | | 39 | | /// </summary> |
| | 522 | 40 | | public static IWorkflowExecutionPipelineBuilder UseExecutionCycleTracking(this IWorkflowExecutionPipelineBuilder pip |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// Installs middleware that scopes the current workflow execution context for transactional workflow dispatch outbo |
| | | 44 | | /// </summary> |
| | 522 | 45 | | public static IWorkflowExecutionPipelineBuilder UseWorkflowDispatchOutbox(this IWorkflowExecutionPipelineBuilder pip |
| | | 46 | | |
| | | 47 | | /// <summary> |
| | | 48 | | /// Installs middleware that persists bookmarks after workflow execution. |
| | | 49 | | /// </summary> |
| | | 50 | | [Obsolete("This middleware is no longer used and will be removed in a future version. Bookmarks are now persisted th |
| | 0 | 51 | | public static IWorkflowExecutionPipelineBuilder UseBookmarkPersistence(this IWorkflowExecutionPipelineBuilder pipeli |
| | | 52 | | |
| | | 53 | | /// <summary> |
| | | 54 | | /// Installs middleware that persists the workflow execution journal. |
| | | 55 | | /// </summary> |
| | | 56 | | [Obsolete("This middleware is no longer used and will be removed in a future version. Execution logs are now persist |
| | 0 | 57 | | public static IWorkflowExecutionPipelineBuilder UseWorkflowExecutionLogPersistence(this IWorkflowExecutionPipelineBu |
| | | 58 | | |
| | | 59 | | /// <summary> |
| | | 60 | | /// Installs middleware that persists activity execution records. |
| | | 61 | | /// </summary> |
| | | 62 | | [Obsolete("This middleware is no longer used and will be removed in a future version. Activity state is now persiste |
| | 0 | 63 | | public static IWorkflowExecutionPipelineBuilder UseActivityExecutionLogPersistence(this IWorkflowExecutionPipelineBu |
| | | 64 | | } |