Exception: Nexo::Workflow::Suspended
- Inherits:
-
StandardError
- Object
- StandardError
- Nexo::Workflow::Suspended
- Defined in:
- lib/nexo/workflow.rb
Overview
Control-flow signal raised by #suspend! and caught by ::execute to pause
a run durably — NOT a failure. It transitions the run to "suspended"
(never "failed") and returns the run to the caller rather than re-raising.
Carries the reason (surfaced to a host UI) and an optional resume_key
(persisted so a host can correlate which resume it is awaiting — Spec 13 Q2).
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
The pause
reason(surfaced to a host UI) and the optionalresume_keya host can correlate the awaited resume against. -
#resume_key ⇒ Object
readonly
The pause
reason(surfaced to a host UI) and the optionalresume_keya host can correlate the awaited resume against.
Instance Method Summary collapse
-
#initialize(reason, resume_key = nil) ⇒ Suspended
constructor
Builds the suspend signal for
reasonwith an optionalresume_key.
Constructor Details
#initialize(reason, resume_key = nil) ⇒ Suspended
Builds the suspend signal for reason with an optional resume_key.
61 62 63 64 65 |
# File 'lib/nexo/workflow.rb', line 61 def initialize(reason, resume_key = nil) @reason = reason @resume_key = resume_key super("workflow suspended: #{reason}") end |
Instance Attribute Details
#reason ⇒ Object (readonly)
The pause reason (surfaced to a host UI) and the optional resume_key
a host can correlate the awaited resume against.
58 59 60 |
# File 'lib/nexo/workflow.rb', line 58 def reason @reason end |
#resume_key ⇒ Object (readonly)
The pause reason (surfaced to a host UI) and the optional resume_key
a host can correlate the awaited resume against.
58 59 60 |
# File 'lib/nexo/workflow.rb', line 58 def resume_key @resume_key end |