# Configuration

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

## Global <a href="#global" id="global"></a>

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

```csharp
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 <a href="#workflow-specific" id="workflow-specific"></a>

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

```csharp
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:

<figure><img src="/files/Ngegp6YzOI8mMekkMzRJ" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.elsaworkflows.io/operate/incidents/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
