Class: Mio::Model::LaunchWorkflowAction

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

Defined Under Namespace

Classes: LaunchWorkflow, WorkflowVariable

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

Constructor Details

This class inherits a constructor from Mio::Model

Instance Method Details

#config_hashObject



22
23
24
25
# File 'lib/mio/model/launch_workflow_action.rb', line 22

def config_hash
  {workflows: @args.workflows
  }
end

#create_hashObject



12
13
14
15
16
17
18
19
20
# File 'lib/mio/model/launch_workflow_action.rb', line 12

def create_hash
  plugin = 'tv.nativ.mio.enterprise.execution.action.file.impl.launch.DefaultLaunchWorkflowCommand'
  {name: @args.name,
   pluginClass: plugin,
   visibilityIds: @args.visibility,
   'type': 'launch',
   'runRuleExpression': ''
  }
end

#validateObject



27
28
29
30
31
32
# File 'lib/mio/model/launch_workflow_action.rb', line 27

def validate
  super
  if @args.workflows.empty?
    raise Mio::Model::EmptyField, 'Field workflows to Mio::Model::LaunchWorkflowAction must contain at least one launch workflow'
  end
end