Class: Dynflow::Director::StepWorkItem
- Inherits:
-
WorkItem
- Object
- Serializable
- WorkItem
- Dynflow::Director::StepWorkItem
- Defined in:
- lib/dynflow/director.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Serializable
Serializable::LEGACY_TIME_FORMAT, Serializable::TIME_FORMAT
Instance Attribute Summary collapse
-
#step ⇒ Object
readonly
Returns the value of attribute step.
Attributes inherited from WorkItem
#execution_plan_id, #queue, #sender_orchestrator_id
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(execution_plan_id, step, queue, sender_orchestrator_id) ⇒ StepWorkItem
constructor
A new instance of StepWorkItem.
- #to_hash ⇒ Object
Methods inherited from WorkItem
Methods inherited from Serializable
Constructor Details
#initialize(execution_plan_id, step, queue, sender_orchestrator_id) ⇒ StepWorkItem
Returns a new instance of StepWorkItem.
64 65 66 67 |
# File 'lib/dynflow/director.rb', line 64 def initialize(execution_plan_id, step, queue, sender_orchestrator_id) super(execution_plan_id, queue, sender_orchestrator_id) @step = step end |
Instance Attribute Details
#step ⇒ Object (readonly)
Returns the value of attribute step.
62 63 64 |
# File 'lib/dynflow/director.rb', line 62 def step @step end |
Class Method Details
.new_from_hash(hash, *_args) ⇒ Object
77 78 79 80 81 82 |
# File 'lib/dynflow/director.rb', line 77 def self.new_from_hash(hash, *_args) self.new(hash[:execution_plan_id], Serializable.from_hash(hash[:step], hash[:execution_plan_id], Dynflow.process_world), hash[:queue], hash[:sender_orchestrator_id]) end |
Instance Method Details
#execute ⇒ Object
69 70 71 |
# File 'lib/dynflow/director.rb', line 69 def execute @step.execute(nil) end |
#to_hash ⇒ Object
73 74 75 |
# File 'lib/dynflow/director.rb', line 73 def to_hash super.merge(step: step.to_hash) end |