Class: Conductor::Http::Models::WorkflowDef

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/conductor/http/models/workflow_def.rb

Overview

Workflow definition model for registering workflows with Conductor

Constant Summary collapse

SWAGGER_TYPES =
{
  name: 'String',
  description: 'String',
  version: 'Integer',
  tasks: 'Array<WorkflowTask>',
  input_parameters: 'Array<String>',
  output_parameters: 'Hash<String, Object>',
  failure_workflow: 'String',
  schema_version: 'Integer',
  restartable: 'Boolean',
  workflow_status_listener_enabled: 'Boolean',
  workflow_status_listener_sink: 'String',
  owner_email: 'String',
  timeout_policy: 'String',
  timeout_seconds: 'Integer',
  variables: 'Hash<String, Object>',
  input_template: 'Hash<String, Object>'
}.freeze
ATTRIBUTE_MAP =
{
  name: :name,
  description: :description,
  version: :version,
  tasks: :tasks,
  input_parameters: :inputParameters,
  output_parameters: :outputParameters,
  failure_workflow: :failureWorkflow,
  schema_version: :schemaVersion,
  restartable: :restartable,
  workflow_status_listener_enabled: :workflowStatusListenerEnabled,
  workflow_status_listener_sink: :workflowStatusListenerSink,
  owner_email: :ownerEmail,
  timeout_policy: :timeoutPolicy,
  timeout_seconds: :timeoutSeconds,
  variables: :variables,
  input_template: :inputTemplate
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

attribute_map, deserialize_model, deserialize_value, find_model_class, from_hash, from_json, parse_datetime, swagger_types, #to_h, #to_json

Constructor Details

#initialize(params = {}) ⇒ WorkflowDef

Returns a new instance of WorkflowDef.



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/conductor/http/models/workflow_def.rb', line 52

def initialize(params = {})
  @name = params[:name]
  @description = params[:description]
  @version = params[:version]
  @tasks = params[:tasks] || []
  @input_parameters = params[:input_parameters] || []
  @output_parameters = params[:output_parameters] || {}
  @failure_workflow = params[:failure_workflow]
  @schema_version = params[:schema_version] || 2
  @restartable = params[:restartable].nil? ? true : params[:restartable]
  @workflow_status_listener_enabled = params[:workflow_status_listener_enabled] || false
  @workflow_status_listener_sink = params[:workflow_status_listener_sink]
  @owner_email = params[:owner_email]
  @timeout_policy = params[:timeout_policy]
  @timeout_seconds = params[:timeout_seconds] || 60
  @variables = params[:variables] || {}
  @input_template = params[:input_template] || {}
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def description
  @description
end

#failure_workflowObject

Returns the value of attribute failure_workflow.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def failure_workflow
  @failure_workflow
end

#input_parametersObject

Returns the value of attribute input_parameters.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def input_parameters
  @input_parameters
end

#input_templateObject

Returns the value of attribute input_template.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def input_template
  @input_template
end

#nameObject

Returns the value of attribute name.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def name
  @name
end

#output_parametersObject

Returns the value of attribute output_parameters.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def output_parameters
  @output_parameters
end

#owner_emailObject

Returns the value of attribute owner_email.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def owner_email
  @owner_email
end

#restartableObject

Returns the value of attribute restartable.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def restartable
  @restartable
end

#schema_versionObject

Returns the value of attribute schema_version.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def schema_version
  @schema_version
end

#tasksObject

Returns the value of attribute tasks.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def tasks
  @tasks
end

#timeout_policyObject

Returns the value of attribute timeout_policy.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def timeout_policy
  @timeout_policy
end

#timeout_secondsObject

Returns the value of attribute timeout_seconds.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def timeout_seconds
  @timeout_seconds
end

#variablesObject

Returns the value of attribute variables.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def variables
  @variables
end

#versionObject

Returns the value of attribute version.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def version
  @version
end

#workflow_status_listener_enabledObject

Returns the value of attribute workflow_status_listener_enabled.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def workflow_status_listener_enabled
  @workflow_status_listener_enabled
end

#workflow_status_listener_sinkObject

Returns the value of attribute workflow_status_listener_sink.



46
47
48
# File 'lib/conductor/http/models/workflow_def.rb', line 46

def workflow_status_listener_sink
  @workflow_status_listener_sink
end