For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configuration

Release-backed incident strategy configuration for Elsa 3.8.0 hosts and workflow definitions.

In release/3.8.0, incident strategy resolution happens in this order:

  1. the workflow definition's WorkflowOptions.IncidentStrategyType

  2. the host-level IncidentOptions.DefaultIncidentStrategy

  3. Elsa'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.Core.IncidentStrategies;
using Elsa.Workflows.Core.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.

Register custom strategies

If you create your own IIncidentStrategy, register it with dependency injection so Elsa can resolve it and so 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.

Last updated