From b2d3fd9fda9bb150899146ff5ddca3c6f253974d Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Wed, 26 Feb 2025 14:53:18 +0100 Subject: [PATCH] Add configuration for default incident handling strategy Configured `IncidentOptions` to set `DefaultIncidentStrategy` to `ContinueWithIncidentsStrategy`. This ensures consistent handling of workflow incidents and improves customization flexibility for incident management. --- src/apps/Elsa.Server.Web/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/apps/Elsa.Server.Web/Program.cs b/src/apps/Elsa.Server.Web/Program.cs index 526cd58b0..285d02f23 100644 --- a/src/apps/Elsa.Server.Web/Program.cs +++ b/src/apps/Elsa.Server.Web/Program.cs @@ -48,10 +48,12 @@ using Elsa.Tenants.Extensions; using Elsa.Workflows; using Elsa.Workflows.Api; using Elsa.Workflows.CommitStates.Strategies; +using Elsa.Workflows.IncidentStrategies; using Elsa.Workflows.LogPersistence; using Elsa.Workflows.Management; using Elsa.Workflows.Management.Compression; using Elsa.Workflows.Management.Stores; +using Elsa.Workflows.Options; using Elsa.Workflows.Runtime.Distributed.Extensions; using Elsa.Workflows.Runtime.Options; using Elsa.Workflows.Runtime.Stores; @@ -687,8 +689,9 @@ services.Configure(options => }); services.Configure(options => options.Ttl = TimeSpan.FromSeconds(10)); - services.Configure(options => options.CacheDuration = TimeSpan.FromDays(1)); +services.Configure(options => options.DefaultIncidentStrategy = typeof(ContinueWithIncidentsStrategy)); + services.AddHealthChecks(); services.AddControllers(); services.AddCors(cors => cors.AddDefaultPolicy(policy => policy.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin().WithExposedHeaders("*")));