Class: Proxy::Dynflow::TaskLauncher::Single

Inherits:
Abstract
  • Object
show all
Defined in:
lib/smart_proxy_dynflow/task_launcher/single.rb

Instance Attribute Summary

Attributes inherited from Abstract

#callback, #options, #results, #world

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Abstract

#initialize, new_from_hash, #to_hash

Constructor Details

This class inherits a constructor from Proxy::Dynflow::TaskLauncher::Abstract

Class Method Details

.input_formatObject



6
7
8
# File 'lib/smart_proxy_dynflow/task_launcher/single.rb', line 6

def self.input_format
  { :action_class => "MyActionClass", :action_input => {} }
end

Instance Method Details

#launch!(input, id: nil) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/smart_proxy_dynflow/task_launcher/single.rb', line 10

def launch!(input, id: nil)
  triggered = trigger(options[:parent],
                      action_class(input),
                      with_callback(input.fetch('action_input', {})),
                      id: id)
  @results = format_result(triggered)
  triggered
end