class Dynflow::Director::EventWorkItem
Attributes
event[R]
request_id[R]
Public Class Methods
new(request_id, execution_plan_id, step, event, queue, sender_orchestrator_id)
click to toggle source
Calls superclass method
Dynflow::Director::StepWorkItem::new
# File lib/dynflow/director.rb, line 87 def initialize(request_id, execution_plan_id, step, event, queue, sender_orchestrator_id) super(execution_plan_id, step, queue, sender_orchestrator_id) @event = event @request_id = request_id end
new_from_hash(hash, *_args)
click to toggle source
# File lib/dynflow/director.rb, line 101 def self.new_from_hash(hash, *_args) self.new(hash[:request_id], hash[:execution_plan_id], Serializable.from_hash(hash[:step], hash[:execution_plan_id], Dynflow.process_world), Dynflow.serializer.load(hash[:event]), hash[:queue], hash[:sender_orchestrator_id]) end
Public Instance Methods
execute()
click to toggle source
# File lib/dynflow/director.rb, line 93 def execute @step.execute(@event) end
to_hash()
click to toggle source
Calls superclass method
Dynflow::Director::StepWorkItem#to_hash
# File lib/dynflow/director.rb, line 97 def to_hash super.merge(request_id: @request_id, event: Dynflow.serializer.dump(@event)) end