Class: Conductor::Http::Models::WorkflowRun

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

Overview

WorkflowRun represents the result of executing a workflow synchronously

Constant Summary collapse

SWAGGER_TYPES =
{
  workflow_id: 'String',
  correlation_id: 'String',
  status: 'String',
  input: 'Hash<String, Object>',
  output: 'Hash<String, Object>',
  tasks: 'Array<Task>',
  request_id: 'String',
  created_by: 'String',
  variables: 'Hash<String, Object>',
  priority: 'Integer',
  reason_for_incompletion: 'String'
}.freeze
ATTRIBUTE_MAP =
{
  workflow_id: :workflowId,
  correlation_id: :correlationId,
  status: :status,
  input: :input,
  output: :output,
  tasks: :tasks,
  request_id: :requestId,
  created_by: :createdBy,
  variables: :variables,
  priority: :priority,
  reason_for_incompletion: :reasonForIncompletion
}.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 = {}) ⇒ WorkflowRun

Returns a new instance of WorkflowRun.



174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/conductor/http/models/workflow.rb', line 174

def initialize(params = {})
  @workflow_id = params[:workflow_id]
  @correlation_id = params[:correlation_id]
  @status = params[:status]
  @input = params[:input] || {}
  @output = params[:output] || {}
  @tasks = params[:tasks] || []
  @request_id = params[:request_id]
  @created_by = params[:created_by]
  @variables = params[:variables] || {}
  @priority = params[:priority]
  @reason_for_incompletion = params[:reason_for_incompletion]
end

Instance Attribute Details

#correlation_idObject

Returns the value of attribute correlation_id.



170
171
172
# File 'lib/conductor/http/models/workflow.rb', line 170

def correlation_id
  @correlation_id
end

#created_byObject

Returns the value of attribute created_by.



170
171
172
# File 'lib/conductor/http/models/workflow.rb', line 170

def created_by
  @created_by
end

#inputObject

Returns the value of attribute input.



170
171
172
# File 'lib/conductor/http/models/workflow.rb', line 170

def input
  @input
end

#outputObject

Returns the value of attribute output.



170
171
172
# File 'lib/conductor/http/models/workflow.rb', line 170

def output
  @output
end

#priorityObject

Returns the value of attribute priority.



170
171
172
# File 'lib/conductor/http/models/workflow.rb', line 170

def priority
  @priority
end

#reason_for_incompletionObject

Returns the value of attribute reason_for_incompletion.



170
171
172
# File 'lib/conductor/http/models/workflow.rb', line 170

def reason_for_incompletion
  @reason_for_incompletion
end

#request_idObject

Returns the value of attribute request_id.



170
171
172
# File 'lib/conductor/http/models/workflow.rb', line 170

def request_id
  @request_id
end

#statusObject

Returns the value of attribute status.



170
171
172
# File 'lib/conductor/http/models/workflow.rb', line 170

def status
  @status
end

#tasksObject

Returns the value of attribute tasks.



170
171
172
# File 'lib/conductor/http/models/workflow.rb', line 170

def tasks
  @tasks
end

#variablesObject

Returns the value of attribute variables.



170
171
172
# File 'lib/conductor/http/models/workflow.rb', line 170

def variables
  @variables
end

#workflow_idObject

Returns the value of attribute workflow_id.



170
171
172
# File 'lib/conductor/http/models/workflow.rb', line 170

def workflow_id
  @workflow_id
end

Instance Method Details

#completed?Boolean

Check if workflow completed successfully

Returns:

  • (Boolean)


190
191
192
# File 'lib/conductor/http/models/workflow.rb', line 190

def completed?
  status == WorkflowStatusConstants::COMPLETED
end

#running?Boolean

Check if workflow is still running

Returns:

  • (Boolean)


196
197
198
# File 'lib/conductor/http/models/workflow.rb', line 196

def running?
  status == WorkflowStatusConstants::RUNNING
end