Configuration
Release-backed incident strategy configuration for Elsa 3.8.2 hosts and workflow definitions.
In release/3.8.2, incident strategy resolution happens in this order:
the workflow definition's
WorkflowOptions.IncidentStrategyTypethe host-level
IncidentOptions.DefaultIncidentStrategyElsa's built-in fallback:
FaultStrategy
This resolution order is implemented by DefaultIncidentStrategyResolver.
Configure a global default
Set a host-wide default when you want most workflows to behave the same way on activity faults:
using Elsa.Workflows.IncidentStrategies;
using Elsa.Workflows.Options;
builder.Services.Configure<IncidentOptions>(options =>
{
options.DefaultIncidentStrategy = typeof(ContinueWithIncidentsStrategy);
});If a workflow does not specify its own incident strategy, Elsa uses this default.
If you do not configure IncidentOptions.DefaultIncidentStrategy, Elsa falls back to FaultStrategy.
Configure a specific workflow
Set builder.WorkflowOptions.IncidentStrategyType inside the workflow when one workflow needs behavior different from the host default:
This setting is serialized with the workflow definition and wins over the host-level default.
Configure it in Elsa Studio
Studio loads the available strategies from:
That endpoint returns the registered IIncidentStrategy implementations and their display metadata. When you pick one in the workflow definition settings, Studio stores the selected type alias or type name in WorkflowDefinition.Options.IncidentStrategyType. Any signed-in user can call the endpoint.

Register custom strategies
If you create your own IIncidentStrategy, register it with dependency injection so Elsa can resolve it and Studio can list it from the descriptors endpoint:
If you want that custom strategy to become the default, also assign its type to IncidentOptions.DefaultIncidentStrategy.
What this setting does not configure
Incident strategies do not replace activity-level retry policies.
Use resilience strategies when an activity should retry automatically before faulting.
Use the alterations retry endpoint when an already faulted workflow instance needs operator-driven retry.
Last updated