class Mio::Model::Workflow::Node

Public Instance Methods

create_hash() click to toggle source
# File lib/mio/model/workflow/node.rb, line 14
def create_hash
  h = {name: @args.name,
       path: "/#{@args.path}",
       type: @args.type.upcase,
      }
  unless @args.assetContext.eql? ''
    h[:assetContext] = @args.assetContext
  end
  if @args.type.upcase == 'ACTION'
    action = @search.find_actions_by_name(@args.action).first
    h[:action] = normalize_action action
  end

  h
end
normalize_action(a) click to toggle source
# File lib/mio/model/workflow/node.rb, line 30
def normalize_action a
  {id: a['id'],
   name: a['name'],
   pluginClass: a['pluginClass']}
end