Class: Conductor::Worker::Events::WorkflowStartError

Inherits:
WorkflowEvent show all
Defined in:
lib/conductor/worker/events/workflow_events.rb

Instance Attribute Summary collapse

Attributes inherited from WorkflowEvent

#version, #workflow_type

Attributes inherited from ConductorEvent

#timestamp

Instance Method Summary collapse

Constructor Details

#initialize(workflow_type:, cause:, version: nil) ⇒ WorkflowStartError

Returns a new instance of WorkflowStartError.



25
26
27
28
# File 'lib/conductor/worker/events/workflow_events.rb', line 25

def initialize(workflow_type:, cause:, version: nil)
  super(workflow_type: workflow_type, version: version)
  @cause = cause
end

Instance Attribute Details

#causeObject (readonly)

Returns the value of attribute cause.



23
24
25
# File 'lib/conductor/worker/events/workflow_events.rb', line 23

def cause
  @cause
end

Instance Method Details

#to_hObject



30
31
32
# File 'lib/conductor/worker/events/workflow_events.rb', line 30

def to_h
  super.merge(cause: @cause.class.name, cause_message: @cause.message)
end