Class: Legion::Gaia::Workflow::Checkpoint
- Inherits:
-
Data
- Object
- Data
- Legion::Gaia::Workflow::Checkpoint
- Defined in:
- lib/legion/gaia/workflow/checkpoint.rb
Overview
Represents a named checkpoint attached to a state. A checkpoint pauses progression until its condition is satisfied. Unlike a guard (which is evaluated on the outgoing transition), a checkpoint is evaluated when attempting to ENTER or LEAVE a state —the workflow sits in a :waiting sub-status until the condition passes.
Instance Attribute Summary collapse
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
Instance Attribute Details
#condition ⇒ Object (readonly)
Returns the value of attribute condition
11 12 13 |
# File 'lib/legion/gaia/workflow/checkpoint.rb', line 11 def condition @condition end |
#name ⇒ Object (readonly)
Returns the value of attribute name
11 12 13 |
# File 'lib/legion/gaia/workflow/checkpoint.rb', line 11 def name @name end |
#state ⇒ Object (readonly)
Returns the value of attribute state
11 12 13 |
# File 'lib/legion/gaia/workflow/checkpoint.rb', line 11 def state @state end |
Instance Method Details
#satisfied?(ctx = {}) ⇒ Boolean
14 15 16 |
# File 'lib/legion/gaia/workflow/checkpoint.rb', line 14 def satisfied?(ctx = {}) condition.nil? || condition.call(ctx) end |