| | | 1 | | using System.Diagnostics.CodeAnalysis; |
| | | 2 | | using System.Reflection; |
| | | 3 | | using Elsa.Common.DistributedHosting; |
| | | 4 | | using Elsa.Common.Features; |
| | | 5 | | using Elsa.Common.RecurringTasks; |
| | | 6 | | using Elsa.Extensions; |
| | | 7 | | using Elsa.Features.Abstractions; |
| | | 8 | | using Elsa.Features.Attributes; |
| | | 9 | | using Elsa.Features.Services; |
| | | 10 | | using Elsa.Mediator.Contracts; |
| | | 11 | | using Elsa.Workflows.Features; |
| | | 12 | | using Elsa.Workflows.Management; |
| | | 13 | | using Elsa.Workflows.Management.Contracts; |
| | | 14 | | using Elsa.Workflows.Management.Services; |
| | | 15 | | using Elsa.Workflows.Runtime.ActivationValidators; |
| | | 16 | | using Elsa.Workflows.Runtime.Entities; |
| | | 17 | | using Elsa.Workflows.Runtime.Handlers; |
| | | 18 | | using Elsa.Workflows.Runtime.Options; |
| | | 19 | | using Elsa.Workflows.Runtime.Providers; |
| | | 20 | | using Elsa.Workflows.Runtime.Stores; |
| | | 21 | | using Elsa.Workflows.Runtime.Tasks; |
| | | 22 | | using Elsa.Workflows.Runtime.UIHints; |
| | | 23 | | using Medallion.Threading; |
| | | 24 | | using Medallion.Threading.FileSystem; |
| | | 25 | | using Microsoft.Extensions.DependencyInjection; |
| | | 26 | | |
| | | 27 | | namespace Elsa.Workflows.Runtime.Features; |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// Installs and configures workflow runtime features. |
| | | 31 | | /// </summary> |
| | | 32 | | [DependsOn(typeof(SystemClockFeature))] |
| | 172 | 33 | | public class WorkflowRuntimeFeature(IModule module) : FeatureBase(module) |
| | | 34 | | { |
| | 311 | 35 | | private IDictionary<string, DispatcherChannel> WorkflowDispatcherChannels { get; set; } = new Dictionary<string, Dis |
| | | 36 | | |
| | | 37 | | /// <summary> |
| | | 38 | | /// A list of workflow builders configured during application startup. |
| | | 39 | | /// </summary> |
| | 366 | 40 | | public IDictionary<string, Func<IServiceProvider, ValueTask<IWorkflow>>> Workflows { get; set; } = new Dictionary<st |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// A factory that instantiates a concrete <see cref="IWorkflowRuntime"/>. |
| | | 44 | | /// </summary> |
| | 400 | 45 | | public Func<IServiceProvider, IWorkflowRuntime> WorkflowRuntime { get; set; } = sp => ActivatorUtilities.CreateInsta |
| | | 46 | | |
| | | 47 | | /// <summary> |
| | | 48 | | /// A factory that instantiates an <see cref="IWorkflowDispatcher"/>. |
| | | 49 | | /// </summary> |
| | 344 | 50 | | public Func<IServiceProvider, IWorkflowDispatcher> WorkflowDispatcher { get; set; } = sp => |
| | 172 | 51 | | { |
| | 329 | 52 | | var decoratedService = ActivatorUtilities.CreateInstance<BackgroundWorkflowDispatcher>(sp); |
| | 329 | 53 | | return ActivatorUtilities.CreateInstance<ValidatingWorkflowDispatcher>(sp, decoratedService); |
| | 172 | 54 | | }; |
| | | 55 | | |
| | | 56 | | /// <summary> |
| | | 57 | | /// A factory that instantiates an <see cref="IStimulusDispatcher"/>. |
| | | 58 | | /// </summary> |
| | 350 | 59 | | public Func<IServiceProvider, IStimulusDispatcher> StimulusDispatcher { get; set; } = sp => ActivatorUtilities.Creat |
| | | 60 | | |
| | | 61 | | /// <summary> |
| | | 62 | | /// A factory that instantiates an <see cref="IWorkflowCancellationDispatcher"/>. |
| | | 63 | | /// </summary> |
| | 345 | 64 | | public Func<IServiceProvider, IWorkflowCancellationDispatcher> WorkflowCancellationDispatcher { get; set; } = sp => |
| | | 65 | | |
| | | 66 | | /// <summary> |
| | | 67 | | /// A factory that instantiates an <see cref="IBookmarkStore"/>. |
| | | 68 | | /// </summary> |
| | 503 | 69 | | public Func<IServiceProvider, IBookmarkStore> BookmarkStore { get; set; } = sp => sp.GetRequiredService<MemoryBookma |
| | | 70 | | |
| | | 71 | | /// <summary> |
| | | 72 | | /// A factory that instantiates an <see cref="IBookmarkQueueStore"/>. |
| | | 73 | | /// </summary> |
| | 505 | 74 | | public Func<IServiceProvider, IBookmarkQueueStore> BookmarkQueueStore { get; set; } = sp => sp.GetRequiredService<Me |
| | | 75 | | |
| | | 76 | | /// <summary> |
| | | 77 | | /// A factory that instantiates an <see cref="ITriggerStore"/>. |
| | | 78 | | /// </summary> |
| | 503 | 79 | | public Func<IServiceProvider, ITriggerStore> TriggerStore { get; set; } = sp => sp.GetRequiredService<MemoryTriggerS |
| | | 80 | | |
| | | 81 | | /// <summary> |
| | | 82 | | /// A factory that instantiates an <see cref="IWorkflowExecutionLogStore"/>. |
| | | 83 | | /// </summary> |
| | 495 | 84 | | public Func<IServiceProvider, IWorkflowExecutionLogStore> WorkflowExecutionLogStore { get; set; } = sp => sp.GetRequ |
| | | 85 | | |
| | | 86 | | /// <summary> |
| | | 87 | | /// A factory that instantiates an <see cref="IActivityExecutionStore"/>. |
| | | 88 | | /// </summary> |
| | 486 | 89 | | public Func<IServiceProvider, IActivityExecutionStore> ActivityExecutionLogStore { get; set; } = sp => sp.GetRequire |
| | | 90 | | |
| | | 91 | | /// <summary> |
| | | 92 | | /// A factory that instantiates an <see cref="IDistributedLockProvider"/>. |
| | | 93 | | /// </summary> |
| | 350 | 94 | | public Func<IServiceProvider, IDistributedLockProvider> DistributedLockProvider { get; set; } = _ => new FileDistrib |
| | | 95 | | |
| | | 96 | | /// <summary> |
| | | 97 | | /// A factory that instantiates an <see cref="ITaskDispatcher"/>. |
| | | 98 | | /// </summary> |
| | 344 | 99 | | public Func<IServiceProvider, ITaskDispatcher> RunTaskDispatcher { get; set; } = sp => sp.GetRequiredService<Backgro |
| | | 100 | | |
| | | 101 | | /// <summary> |
| | | 102 | | /// A factory that instantiates an <see cref="IBackgroundActivityScheduler"/>. |
| | | 103 | | /// </summary> |
| | 485 | 104 | | public Func<IServiceProvider, IBackgroundActivityScheduler> BackgroundActivityScheduler { get; set; } = sp => Activa |
| | | 105 | | |
| | | 106 | | /// <summary> |
| | | 107 | | /// A factory that instantiates a log record sink for an <see cref="ActivityExecutionRecord"/>. |
| | | 108 | | /// </summary> |
| | 781 | 109 | | public Func<IServiceProvider, ILogRecordSink<ActivityExecutionRecord>> ActivityExecutionLogSink { get; set; } = sp = |
| | | 110 | | |
| | | 111 | | /// <summary> |
| | | 112 | | /// A factory that instantiates a log record sink for an <see cref="WorkflowExecutionLogRecord"/>. |
| | | 113 | | /// </summary> |
| | 781 | 114 | | public Func<IServiceProvider, ILogRecordSink<WorkflowExecutionLogRecord>> WorkflowExecutionLogSink { get; set; } = s |
| | | 115 | | |
| | | 116 | | /// <summary> |
| | | 117 | | /// A factory that instantiates an <see cref="ICommandHandler"/>. |
| | | 118 | | /// </summary> |
| | 172 | 119 | | public Func<IServiceProvider, ICommandHandler> DispatchWorkflowCommandHandler { get; set; } = sp => sp.GetRequiredSe |
| | | 120 | | |
| | 173 | 121 | | public Func<IServiceProvider, IBookmarkQueueWorker> BookmarkQueueWorker { get; set; } = sp => sp.GetRequiredService< |
| | | 122 | | |
| | | 123 | | /// <summary> |
| | | 124 | | /// A delegate to configure the <see cref="DistributedLockingOptions"/>. |
| | | 125 | | /// </summary> |
| | 350 | 126 | | public Action<DistributedLockingOptions> DistributedLockingOptions { get; set; } = _ => { }; |
| | | 127 | | |
| | | 128 | | /// <summary> |
| | | 129 | | /// A delegate to configure the <see cref="WorkflowInboxCleanupOptions"/>. |
| | | 130 | | /// </summary> |
| | | 131 | | [Obsolete("Will be removed in a future version")] |
| | 344 | 132 | | public Action<WorkflowInboxCleanupOptions> WorkflowInboxCleanupOptions { get; set; } = _ => { }; |
| | | 133 | | |
| | | 134 | | /// <summary> |
| | | 135 | | /// A delegate to configure the <see cref="WorkflowDispatcherOptions"/>. |
| | | 136 | | /// </summary> |
| | 483 | 137 | | public Action<WorkflowDispatcherOptions> WorkflowDispatcherOptions { get; set; } = _ => { }; |
| | | 138 | | |
| | | 139 | | /// <summary> |
| | | 140 | | /// A delegate to configure the <see cref="BookmarkQueuePurgeOptions"/>. |
| | | 141 | | /// </summary> |
| | 344 | 142 | | public Action<BookmarkQueuePurgeOptions> BookmarkQueuePurgeOptions { get; set; } = _ => { }; |
| | | 143 | | |
| | | 144 | | /// <summary> |
| | | 145 | | /// Enables the workflow inbox cleanup job. |
| | | 146 | | /// </summary> |
| | | 147 | | public WorkflowRuntimeFeature EnableWorkflowInboxCleanupJob() |
| | | 148 | | { |
| | 0 | 149 | | Services.Configure<WorkflowInboxCleanupOptions>(options => { options.IsEnabled = true; }); |
| | 0 | 150 | | return this; |
| | | 151 | | } |
| | | 152 | | |
| | | 153 | | /// <summary> |
| | | 154 | | /// Disables the workflow inbox cleanup job. |
| | | 155 | | /// </summary> |
| | | 156 | | public WorkflowRuntimeFeature DisableWorkflowInboxCleanupJob() |
| | | 157 | | { |
| | 0 | 158 | | Services.Configure<WorkflowInboxCleanupOptions>(options => { options.IsEnabled = false; }); |
| | 0 | 159 | | return this; |
| | | 160 | | } |
| | | 161 | | |
| | | 162 | | /// <summary> |
| | | 163 | | /// Register the specified workflow type. |
| | | 164 | | /// </summary> |
| | | 165 | | public WorkflowRuntimeFeature AddWorkflow<T>() where T : IWorkflow |
| | | 166 | | { |
| | 9 | 167 | | Workflows.Add<T>(); |
| | 9 | 168 | | return this; |
| | | 169 | | } |
| | | 170 | | |
| | | 171 | | /// <summary> |
| | | 172 | | /// Register all workflows in the specified assembly. |
| | | 173 | | /// </summary> |
| | | 174 | | [RequiresUnreferencedCode("The assembly is required to be referenced.")] |
| | | 175 | | public WorkflowRuntimeFeature AddWorkflowsFrom(Assembly assembly) |
| | | 176 | | { |
| | 2 | 177 | | var workflowTypes = assembly.GetExportedTypes() |
| | 101 | 178 | | .Where(x => typeof(IWorkflow).IsAssignableFrom(x) && x is { IsAbstract: false, IsInterface: false, IsGeneric |
| | 2 | 179 | | .ToList(); |
| | | 180 | | |
| | 102 | 181 | | foreach (var workflowType in workflowTypes) |
| | 49 | 182 | | Workflows.Add(workflowType); |
| | | 183 | | |
| | 2 | 184 | | return this; |
| | | 185 | | } |
| | | 186 | | |
| | | 187 | | /// <summary> |
| | | 188 | | /// Adds a dispatcher channel. |
| | | 189 | | /// </summary> |
| | | 190 | | public WorkflowRuntimeFeature AddDispatcherChannel(string channel) |
| | | 191 | | { |
| | 0 | 192 | | return AddDispatcherChannel(new DispatcherChannel |
| | 0 | 193 | | { |
| | 0 | 194 | | Name = channel |
| | 0 | 195 | | }); |
| | | 196 | | } |
| | | 197 | | |
| | | 198 | | /// <summary> |
| | | 199 | | /// Adds a dispatcher channel. |
| | | 200 | | /// </summary> |
| | | 201 | | public WorkflowRuntimeFeature AddDispatcherChannel(DispatcherChannel channel) |
| | | 202 | | { |
| | 0 | 203 | | WorkflowDispatcherChannels[channel.Name] = channel; |
| | 0 | 204 | | return this; |
| | | 205 | | } |
| | | 206 | | |
| | | 207 | | /// <inheritdoc /> |
| | | 208 | | public override void Configure() |
| | | 209 | | { |
| | 172 | 210 | | Module.AddActivitiesFrom<WorkflowRuntimeFeature>(); |
| | 172 | 211 | | Module.Configure<WorkflowsFeature>(workflows => |
| | 172 | 212 | | { |
| | 609 | 213 | | workflows.CommitStateHandler = sp => sp.GetRequiredService<DefaultCommitStateHandler>(); |
| | 344 | 214 | | }); |
| | | 215 | | |
| | 172 | 216 | | Services.Configure<RecurringTaskOptions>(options => |
| | 172 | 217 | | { |
| | 5 | 218 | | options.Schedule.ConfigureTask<TriggerBookmarkQueueRecurringTask>(TimeSpan.FromSeconds(10)); |
| | 177 | 219 | | }); |
| | 172 | 220 | | } |
| | | 221 | | |
| | | 222 | | /// <inheritdoc /> |
| | | 223 | | public override void Apply() |
| | | 224 | | { |
| | | 225 | | // Options. |
| | 172 | 226 | | Services.Configure(DistributedLockingOptions); |
| | 172 | 227 | | Services.Configure(WorkflowInboxCleanupOptions); |
| | 172 | 228 | | Services.Configure(WorkflowDispatcherOptions); |
| | 172 | 229 | | Services.Configure(BookmarkQueuePurgeOptions); |
| | 444 | 230 | | Services.Configure<RuntimeOptions>(options => { options.Workflows = Workflows; }); |
| | 172 | 231 | | Services.Configure<WorkflowDispatcherOptions>(options => |
| | 172 | 232 | | { |
| | 139 | 233 | | options.Channels.AddRange(WorkflowDispatcherChannels.Values); |
| | 311 | 234 | | }); |
| | | 235 | | |
| | 172 | 236 | | Services |
| | 172 | 237 | | // Core. |
| | 172 | 238 | | .AddScoped<ITriggerIndexer, TriggerIndexer>() |
| | 172 | 239 | | .AddScoped<IWorkflowInstanceFactory, WorkflowInstanceFactory>() |
| | 172 | 240 | | .AddScoped<IWorkflowHostFactory, WorkflowHostFactory>() |
| | 172 | 241 | | .AddScoped<IBackgroundActivityInvoker, BackgroundActivityInvoker>() |
| | 172 | 242 | | .AddScoped(WorkflowRuntime) |
| | 172 | 243 | | .AddScoped(WorkflowDispatcher) |
| | 172 | 244 | | .AddScoped(StimulusDispatcher) |
| | 172 | 245 | | .AddScoped(WorkflowCancellationDispatcher) |
| | 172 | 246 | | .AddScoped(RunTaskDispatcher) |
| | 172 | 247 | | .AddScoped(ActivityExecutionLogSink) |
| | 172 | 248 | | .AddScoped(WorkflowExecutionLogSink) |
| | 172 | 249 | | .AddSingleton(BackgroundActivityScheduler) |
| | 172 | 250 | | .AddSingleton<RandomLongIdentityGenerator>() |
| | 172 | 251 | | .AddSingleton<IBookmarkQueueSignaler, BookmarkQueueSignaler>() |
| | 172 | 252 | | .AddScoped<IBookmarkQueueWorker, BookmarkQueueWorker>() |
| | 172 | 253 | | .AddScoped<IBookmarkManager, DefaultBookmarkManager>() |
| | 172 | 254 | | .AddScoped<IActivityExecutionManager, DefaultActivityExecutionManager>() |
| | 172 | 255 | | .AddScoped<IActivityExecutionStatsService, ActivityExecutionStatsService>() |
| | 172 | 256 | | .AddScoped<IActivityExecutionMapper, DefaultActivityExecutionMapper>() |
| | 172 | 257 | | .AddScoped<IWorkflowDefinitionStorePopulator, DefaultWorkflowDefinitionStorePopulator>() |
| | 172 | 258 | | .AddScoped<IRegistriesPopulator, DefaultRegistriesPopulator>() |
| | 172 | 259 | | .AddScoped<IWorkflowDefinitionsRefresher, WorkflowDefinitionsRefresher>() |
| | 172 | 260 | | .AddScoped<IWorkflowDefinitionsReloader, WorkflowDefinitionsReloader>() |
| | 172 | 261 | | .AddScoped<IWorkflowRegistry, DefaultWorkflowRegistry>() |
| | 172 | 262 | | .AddScoped<IWorkflowMatcher, WorkflowMatcher>() |
| | 172 | 263 | | .AddScoped<IWorkflowInvoker, WorkflowInvoker>() |
| | 172 | 264 | | .AddScoped<IStimulusSender, StimulusSender>() |
| | 172 | 265 | | .AddScoped<ITriggerBoundWorkflowService, TriggerBoundWorkflowService>() |
| | 172 | 266 | | .AddScoped<IBookmarkBoundWorkflowService, BookmarkBoundWorkflowService>() |
| | 172 | 267 | | .AddScoped<ITaskReporter, TaskReporter>() |
| | 172 | 268 | | .AddScoped<SynchronousTaskDispatcher>() |
| | 172 | 269 | | .AddScoped<BackgroundTaskDispatcher>() |
| | 172 | 270 | | .AddScoped<StoreActivityExecutionLogSink>() |
| | 172 | 271 | | .AddScoped<StoreWorkflowExecutionLogSink>() |
| | 172 | 272 | | .AddScoped<DispatchWorkflowCommandHandler>() |
| | 172 | 273 | | .AddScoped<IEventPublisher, EventPublisher>() |
| | 172 | 274 | | .AddScoped<IBookmarkUpdater, BookmarkUpdater>() |
| | 172 | 275 | | .AddScoped<IBookmarksPersister, BookmarksPersister>() |
| | 172 | 276 | | .AddScoped<IBookmarkResumer, BookmarkResumer>() |
| | 172 | 277 | | .AddScoped<IBookmarkQueue, StoreBookmarkQueue>() |
| | 172 | 278 | | .AddScoped<IWorkflowResumer, WorkflowResumer>() |
| | 172 | 279 | | .AddScoped<ITriggerInvoker, TriggerInvoker>() |
| | 172 | 280 | | .AddScoped<IWorkflowCanceler, WorkflowCanceler>() |
| | 172 | 281 | | .AddScoped<IWorkflowCancellationService, WorkflowCancellationService>() |
| | 172 | 282 | | .AddScoped<IWorkflowActivationStrategyEvaluator, DefaultWorkflowActivationStrategyEvaluator>() |
| | 172 | 283 | | .AddScoped<IWorkflowStarter, DefaultWorkflowStarter>() |
| | 172 | 284 | | .AddScoped<IWorkflowRestarter, DefaultWorkflowRestarter>() |
| | 172 | 285 | | .AddScoped<IBookmarkQueuePurger, DefaultBookmarkQueuePurger>() |
| | 172 | 286 | | .AddScoped<ILogRecordExtractor<WorkflowExecutionLogRecord>, WorkflowExecutionLogRecordExtractor>() |
| | 172 | 287 | | .AddScoped<IActivityPropertyLogPersistenceEvaluator, ActivityPropertyLogPersistenceEvaluator>() |
| | 172 | 288 | | .AddScoped<IBookmarkQueueProcessor, BookmarkQueueProcessor>() |
| | 172 | 289 | | .AddScoped<DefaultCommitStateHandler>() |
| | 172 | 290 | | .AddScoped<WorkflowHeartbeatGeneratorFactory>() |
| | 172 | 291 | | |
| | 172 | 292 | | // Deprecated services. |
| | 172 | 293 | | .AddScoped<IWorkflowInbox, StimulusProxyWorkflowInbox>() |
| | 172 | 294 | | |
| | 172 | 295 | | // Stores. |
| | 172 | 296 | | .AddScoped(BookmarkStore) |
| | 172 | 297 | | .AddScoped(BookmarkQueueStore) |
| | 172 | 298 | | .AddScoped(TriggerStore) |
| | 172 | 299 | | .AddScoped(WorkflowExecutionLogStore) |
| | 172 | 300 | | .AddScoped(ActivityExecutionLogStore) |
| | 172 | 301 | | |
| | 172 | 302 | | // Lazy services. |
| | 143 | 303 | | .AddScoped<Func<IEnumerable<IWorkflowsProvider>>>(sp => sp.GetServices<IWorkflowsProvider>) |
| | 482 | 304 | | .AddScoped<Func<IEnumerable<IWorkflowMaterializer>>>(sp => sp.GetServices<IWorkflowMaterializer>) |
| | 172 | 305 | | |
| | 172 | 306 | | // Noop stores. |
| | 172 | 307 | | .AddScoped<MemoryWorkflowExecutionLogStore>() |
| | 172 | 308 | | .AddScoped<MemoryActivityExecutionStore>() |
| | 172 | 309 | | |
| | 172 | 310 | | // Memory stores. |
| | 172 | 311 | | .AddMemoryStore<StoredBookmark, MemoryBookmarkStore>() |
| | 172 | 312 | | .AddMemoryStore<StoredTrigger, MemoryTriggerStore>() |
| | 172 | 313 | | .AddMemoryStore<BookmarkQueueItem, MemoryBookmarkQueueStore>() |
| | 172 | 314 | | .AddMemoryStore<WorkflowExecutionLogRecord, MemoryWorkflowExecutionLogStore>() |
| | 172 | 315 | | .AddMemoryStore<ActivityExecutionRecord, MemoryActivityExecutionStore>() |
| | 172 | 316 | | |
| | 172 | 317 | | // Startup tasks, background tasks, and recurring tasks. |
| | 172 | 318 | | .AddStartupTask<PopulateRegistriesStartupTask>() |
| | 172 | 319 | | .AddRecurringTask<TriggerBookmarkQueueRecurringTask>(TimeSpan.FromMinutes(1)) |
| | 172 | 320 | | .AddRecurringTask<PurgeBookmarkQueueRecurringTask>(TimeSpan.FromSeconds(10)) |
| | 172 | 321 | | .AddRecurringTask<RestartInterruptedWorkflowsTask>(TimeSpan.FromMinutes(5)) // Same default as the workflow |
| | 172 | 322 | | |
| | 172 | 323 | | // Distributed locking. |
| | 172 | 324 | | .AddSingleton(DistributedLockProvider) |
| | 172 | 325 | | |
| | 172 | 326 | | // Workflow definition providers. |
| | 172 | 327 | | .AddWorkflowDefinitionProvider<ClrWorkflowsProvider>() |
| | 172 | 328 | | |
| | 172 | 329 | | // UI property handlers. |
| | 172 | 330 | | .AddScoped<IPropertyUIHandler, DispatcherChannelOptionsProvider>() |
| | 172 | 331 | | |
| | 172 | 332 | | // Domain handlers. |
| | 172 | 333 | | .AddCommandHandler<DispatchWorkflowCommandHandler>() |
| | 172 | 334 | | .AddCommandHandler<DispatchStimulusCommandHandler>() |
| | 172 | 335 | | .AddCommandHandler<CancelWorkflowsCommandHandler>() |
| | 172 | 336 | | .AddNotificationHandler<ResumeDispatchWorkflowActivity>() |
| | 172 | 337 | | .AddNotificationHandler<ResumeBulkDispatchWorkflowActivity>() |
| | 172 | 338 | | .AddNotificationHandler<ResumeExecuteWorkflowActivity>() |
| | 172 | 339 | | .AddNotificationHandler<IndexTriggers>() |
| | 172 | 340 | | .AddNotificationHandler<CancelBackgroundActivities>() |
| | 172 | 341 | | .AddNotificationHandler<DeleteBookmarks>() |
| | 172 | 342 | | .AddNotificationHandler<DeleteTriggers>() |
| | 172 | 343 | | .AddNotificationHandler<DeleteActivityExecutionLogRecords>() |
| | 172 | 344 | | .AddNotificationHandler<DeleteWorkflowExecutionLogRecords>() |
| | 172 | 345 | | .AddNotificationHandler<RefreshActivityRegistry>() |
| | 172 | 346 | | .AddNotificationHandler<SignalBookmarkQueueWorker>() |
| | 172 | 347 | | .AddNotificationHandler<EvaluateParentLogPersistenceModes>() |
| | 172 | 348 | | .AddNotificationHandler<CaptureActivityExecutionState>() |
| | 172 | 349 | | .AddNotificationHandler<ValidateWorkflowRequestHandler>() |
| | 172 | 350 | | |
| | 172 | 351 | | // Workflow activation strategies. |
| | 172 | 352 | | .AddScoped<IWorkflowActivationStrategy, SingletonStrategy>() |
| | 172 | 353 | | .AddScoped<IWorkflowActivationStrategy, CorrelatedSingletonStrategy>() |
| | 172 | 354 | | .AddScoped<IWorkflowActivationStrategy, CorrelationStrategy>() |
| | 172 | 355 | | ; |
| | 172 | 356 | | } |
| | | 357 | | } |