LogoLogo
GitHub
  • Elsa Workflows 3
  • Getting Started
    • Concepts
      • Outcomes
      • Correlation ID
    • Hello World
    • Prerequisites
    • Packages
    • Containers
      • Docker
      • Docker Compose
        • Elsa Server + Studio
        • Elsa Server + Studio - Single Image
        • Persistent Database
        • Traefik
  • Application Types
    • Elsa Server
    • Elsa Studio
    • Elsa Server + Studio (WASM)
  • Guides
    • HTTP Workflows
      • Programmatic
      • Designer
    • External Application Interaction
    • Loading Workflows from JSON
    • Running Workflows
      • Using Elsa Studio
      • Using a Trigger
      • Dispatch Workflow Activity
  • Activities
    • Control Flow
      • Decision
    • MassTransit
      • Tutorial
  • Expressions
    • C#
    • JavaScript
    • Python
    • Liquid
  • Extensibility
    • Custom Activities
  • Reusable Triggers (3.5-preview)
  • Multitenancy
    • Introduction
    • Setup
  • Operate
    • Variables
    • Activation Strategies
    • Incidents
      • Strategies
      • Configuration
    • Alterations
      • Alteration Plans
        • REST API
      • Applying Alterations
        • REST API
        • Extensibility
  • Optimize
    • Log Persistence
    • Retention
  • Hosting
    • Distributed Hosting
Powered by GitBook
On this page
  • Global
  • Workflow Specific
Edit on GitHub
  1. Operate
  2. Incidents

Configuration

We can configure what the workflow engine should do in case of an incident through Incident Strategies.

Global

The default strategy is FaultStrategy, but we can change it by setting the IncidentStrategy property of the WorkflowOptions class:

services.Configure<IncidentOptions>(options =>
{
    options.DefaultIncidentStrategy = typeof(ContinueWithIncidentsStrategy);
});

The default strategy will be used for all workflows that do not have a strategy configured explicitly.

Workflow Specific

We can configure the incident strategy for a workflow by setting the WorkflowOptions property of the Workflow class:

public class MyWorkflow : WorkflowBase
{
    protected override void Build(IWorkflowBuilder builder)
    {
        builder.WorkflowOptions.IncidentStrategyType = typeof(ContinueWithIncidentsStrategy);
    }
}

We can also configure the incident strategy for a workflow via Elsa Studio:

PreviousStrategiesNextAlterations

Last updated 4 months ago