Class: Proxy::Dynflow::Action::Shareable

Inherits:
Dynflow::Action
  • Object
show all
Defined in:
lib/smart_proxy_dynflow/action/shareable.rb

Direct Known Subclasses

Runner

Instance Method Summary collapse

Instance Method Details

#plan(input) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/smart_proxy_dynflow/action/shareable.rb', line 5

def plan(input)
  input = input.dup
  callback = input.delete('callback')
  if callback
    input[:task_id] = callback['task_id']
  else
    input[:task_id] ||= SecureRandom.uuid
  end

  planned_action = plan_self(input)
  # code only applicable, when run with SmartProxyDynflowCore in place
  if on_proxy? && callback
    plan_action(Proxy::Dynflow::Callback::Action, callback, planned_action.output)
  end
end