| | | 1 | | using Elsa.Workflows.Runtime; |
| | | 2 | | using Elsa.Workflows.Runtime.IngressSources; |
| | | 3 | | |
| | | 4 | | namespace Elsa.Scheduling.IngressSources; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// Surfaces scheduled-trigger ingress (Cron, Timer, StartAt, Delay) as an <see cref="IIngressSource"/> in the runtime's |
| | | 8 | | /// diagnostic registry. Pause/resume is observed transitively via <see cref="IQuiescenceSignal"/> — scheduled triggers |
| | | 9 | | /// dispatch through the bookmark queue, whose processor consults the signal at the top of each invocation (FR-024). |
| | | 10 | | /// This adapter therefore has no behavior of its own beyond reporting state, which is what |
| | | 11 | | /// <see cref="PassiveIngressSource"/> is for. |
| | | 12 | | /// </summary> |
| | 8 | 13 | | public sealed class ScheduledTriggerIngressSource(IQuiescenceSignal signal) : PassiveIngressSource(signal) |
| | | 14 | | { |
| | | 15 | | /// <inheritdoc /> |
| | | 16 | | /// <remarks> |
| | | 17 | | /// Covers all scheduling-driven trigger types (Cron, Timer, StartAt, Delay) — not just Cron. Operators reading |
| | | 18 | | /// <c>GET /admin/workflow-runtime/status</c> or <c>DrainOutcome.Sources</c> see this name verbatim; the generic |
| | | 19 | | /// <c>scheduling.trigger</c> avoids implying Cron-only coverage. Singular to match the rest of the suite |
| | | 20 | | /// (<c>http.trigger</c>, <c>internal.bookmark-queue-worker</c>) — the name identifies the source, not the |
| | | 21 | | /// number of trigger types it dispatches. |
| | | 22 | | /// </remarks> |
| | 28 | 23 | | public override string Name => "scheduling.trigger"; |
| | | 24 | | } |