| | | 1 | | using Elsa.Workflows.Management.Entities; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Workflows.Runtime.Options; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Provides options to the workflow runtime. |
| | | 7 | | /// </summary> |
| | | 8 | | public class RuntimeOptions |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// A list of workflow builders configured during application startup. |
| | | 12 | | /// </summary> |
| | 556 | 13 | | public IDictionary<string, Func<IServiceProvider, ValueTask<IWorkflow>>> Workflows { get; set; } = new Dictionary<st |
| | | 14 | | |
| | | 15 | | /// <summary> |
| | | 16 | | /// The default workflow liveness threshold. |
| | | 17 | | /// </summary> |
| | | 18 | | /// <remarks> |
| | | 19 | | /// The liveness threshold is used to determine if a persisted workflow instance in the <see cref="WorkflowSubStatus |
| | | 20 | | /// Interrupted workflows will be attempted to be restarted. |
| | | 21 | | /// A separate heartbeat process will ensure the <see cref="WorkflowInstance.UpdatedAt"/> is updated before this thr |
| | | 22 | | /// If the workflow instance got removed from memory, e.g. because of an application shutdown, the LastUpdated field |
| | | 23 | | /// </remarks> |
| | 613 | 24 | | public TimeSpan InactivityThreshold { get; set; } = TimeSpan.FromMinutes(5); |
| | | 25 | | |
| | | 26 | | /// <summary> |
| | | 27 | | /// The number of workflow instances to restart in a single batch. |
| | | 28 | | /// </summary> |
| | | 29 | | /// <remarks> |
| | | 30 | | /// The batch size represents the number of workflow instance records to load into memory at a time. |
| | | 31 | | /// This provides control over memory consumption of the application. |
| | | 32 | | /// </remarks> |
| | 138 | 33 | | public int RestartInterruptedWorkflowsBatchSize { get; set; } = 100; |
| | | 34 | | } |