Class: Mio::Model::LaunchWorkflowAction::LaunchWorkflow

Inherits:
Mio::Model
  • Object
show all
Defined in:
lib/mio/model/launchworkflow/launch_workflow.rb

Instance Attribute Summary

Attributes inherited from Mio::Model

#args, #client, #search

Instance Method Summary collapse

Methods inherited from Mio::Model

#configure, #create, field, #go, #initialize, mappings, nested, #set_enable, set_resource, #set_start, #validate

Constructor Details

This class inherits a constructor from Mio::Model

Instance Method Details

#create_hashObject



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/mio/model/launchworkflow/launch_workflow.rb', line 15

def create_hash
  workflow_definition = @search.find_workflowDefinitions_by_name(@args.name).first
  if workflow_definition.nil?
    raise Mio::Model::NoSuchResource, 'No such workflowDefinition [' + @args.name + ']'
  end

  {Workflow: { id:  workflow_definition['id']},
   'inherit-variables': @args.inheritVariables,
   'workflow-string-variable': @args.workFlowStringVariables,
   'workflow-object-variable': @args.workFlowObjectVariables,
   'workflow-date-variable': @args.workflowDateVariables
  }
end