Class: Conductor::Http::Models::WorkflowRun
- 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
-
#correlation_id ⇒ Object
Returns the value of attribute correlation_id.
-
#created_by ⇒ Object
Returns the value of attribute created_by.
-
#input ⇒ Object
Returns the value of attribute input.
-
#output ⇒ Object
Returns the value of attribute output.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#reason_for_incompletion ⇒ Object
Returns the value of attribute reason_for_incompletion.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tasks ⇒ Object
Returns the value of attribute tasks.
-
#variables ⇒ Object
Returns the value of attribute variables.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
Instance Method Summary collapse
-
#completed? ⇒ Boolean
Check if workflow completed successfully.
-
#initialize(params = {}) ⇒ WorkflowRun
constructor
A new instance of WorkflowRun.
-
#running? ⇒ Boolean
Check if workflow is still running.
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_id ⇒ Object
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_by ⇒ Object
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 |
#input ⇒ Object
Returns the value of attribute input.
170 171 172 |
# File 'lib/conductor/http/models/workflow.rb', line 170 def input @input end |
#output ⇒ Object
Returns the value of attribute output.
170 171 172 |
# File 'lib/conductor/http/models/workflow.rb', line 170 def output @output end |
#priority ⇒ Object
Returns the value of attribute priority.
170 171 172 |
# File 'lib/conductor/http/models/workflow.rb', line 170 def priority @priority end |
#reason_for_incompletion ⇒ Object
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_id ⇒ Object
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 |
#status ⇒ Object
Returns the value of attribute status.
170 171 172 |
# File 'lib/conductor/http/models/workflow.rb', line 170 def status @status end |
#tasks ⇒ Object
Returns the value of attribute tasks.
170 171 172 |
# File 'lib/conductor/http/models/workflow.rb', line 170 def tasks @tasks end |
#variables ⇒ Object
Returns the value of attribute variables.
170 171 172 |
# File 'lib/conductor/http/models/workflow.rb', line 170 def variables @variables end |
#workflow_id ⇒ Object
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
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
196 197 198 |
# File 'lib/conductor/http/models/workflow.rb', line 196 def running? status == WorkflowStatusConstants::RUNNING end |