| | | 1 | | namespace Elsa.Workflows.Runtime; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Structured result of a completed drain, returned by <c>IDrainOrchestrator.DrainAsync</c>. |
| | | 5 | | /// </summary> |
| | 21 | 6 | | public sealed record DrainOutcome( |
| | 46 | 7 | | DrainResult OverallResult, |
| | 0 | 8 | | DateTimeOffset StartedAt, |
| | 0 | 9 | | DateTimeOffset CompletedAt, |
| | 26 | 10 | | TimeSpan PausePhaseDuration, |
| | 26 | 11 | | TimeSpan WaitPhaseDuration, |
| | 2 | 12 | | IReadOnlyList<IngressSourceFinalState> Sources, |
| | 27 | 13 | | int ExecutionCyclesForceCancelledCount, |
| | 23 | 14 | | IReadOnlyList<string> ForceCancelledInstanceIds) |
| | | 15 | | { |
| | | 16 | | /// <summary> |
| | | 17 | | /// <c>true</c> when this outcome was returned from the orchestrator's cache (i.e., a previous drain already |
| | | 18 | | /// ran in this generation and the caller's request was answered with the cached result rather than triggering |
| | | 19 | | /// a fresh drain). Audit consumers MUST skip publishing notifications when this flag is set, otherwise |
| | | 20 | | /// repeated calls would emit spurious audit events and break the SC-007 idempotency guarantee. |
| | | 21 | | /// </summary> |
| | 4 | 22 | | public bool WasCached { get; init; } |
| | | 23 | | } |