Class: Dynflow::Action::Suspended
- Inherits:
-
Object
- Object
- Dynflow::Action::Suspended
- Defined in:
- lib/dynflow/action/suspended.rb
Instance Attribute Summary collapse
-
#execution_plan_id ⇒ Object
readonly
Returns the value of attribute execution_plan_id.
-
#step_id ⇒ Object
readonly
Returns the value of attribute step_id.
Instance Method Summary collapse
- #<<(event = nil) ⇒ Object
- #event(event, sent = Concurrent::Promises.resolvable_future, optional: false) ⇒ Object (also: #ask)
-
#initialize(action) ⇒ Suspended
constructor
A new instance of Suspended.
- #plan_event(event, time, sent = Concurrent::Promises.resolvable_future, optional: false) ⇒ Object
Constructor Details
#initialize(action) ⇒ Suspended
Returns a new instance of Suspended.
7 8 9 10 11 |
# File 'lib/dynflow/action/suspended.rb', line 7 def initialize(action) @world = action.world @execution_plan_id = action.execution_plan_id @step_id = action.run_step_id end |
Instance Attribute Details
#execution_plan_id ⇒ Object (readonly)
Returns the value of attribute execution_plan_id.
5 6 7 |
# File 'lib/dynflow/action/suspended.rb', line 5 def execution_plan_id @execution_plan_id end |
#step_id ⇒ Object (readonly)
Returns the value of attribute step_id.
5 6 7 |
# File 'lib/dynflow/action/suspended.rb', line 5 def step_id @step_id end |
Instance Method Details
#<<(event = nil) ⇒ Object
23 24 25 |
# File 'lib/dynflow/action/suspended.rb', line 23 def <<(event = nil) event event end |
#event(event, sent = Concurrent::Promises.resolvable_future, optional: false) ⇒ Object Also known as: ask
17 18 19 20 21 |
# File 'lib/dynflow/action/suspended.rb', line 17 def event(event, sent = Concurrent::Promises.resolvable_future, optional: false) # TODO: deprecate 2 levels backtrace (to know it's called from clock or internaly) # remove lib/dynflow/clock.rb ClockReference#ping branch condition on removal. plan_event(event, nil, sent, optional: optional) end |
#plan_event(event, time, sent = Concurrent::Promises.resolvable_future, optional: false) ⇒ Object
13 14 15 |
# File 'lib/dynflow/action/suspended.rb', line 13 def plan_event(event, time, sent = Concurrent::Promises.resolvable_future, optional: false) @world.plan_event(execution_plan_id, step_id, event, time, sent, optional: optional) end |