Class: Dynflow::ExecutionPlan::InvalidPlan

Inherits:
Object
  • Object
show all
Defined in:
lib/dynflow/execution_plan.rb

Overview

a fallback object representing a plan with some corrupted data, preventing to load the whole plan properly, this can be used for presenting at least some data and not running into internal server errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception, id, label, state, started_at = nil, ended_at = nil, execution_time = nil, real_time = nil, execution_history = nil) ⇒ InvalidPlan

Returns a new instance of InvalidPlan.



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/dynflow/execution_plan.rb', line 17

def initialize(exception, id, label, state,
               started_at = nil, ended_at = nil,
               execution_time = nil, real_time = nil, execution_history = nil)
  @exception = exception
  @id = id
  @label = label || 'N/A'
  @state = state
  @started_at = started_at
  @ended_at = ended_at
  @execution_time = execution_time
  @real_time = real_time
  @execution_history = execution_history || []
end

Instance Attribute Details

#ended_atObject (readonly)

Returns the value of attribute ended_at.



13
14
15
# File 'lib/dynflow/execution_plan.rb', line 13

def ended_at
  @ended_at
end

#exceptionObject (readonly)

Returns the value of attribute exception.



13
14
15
# File 'lib/dynflow/execution_plan.rb', line 13

def exception
  @exception
end

#execution_historyObject (readonly)

Returns the value of attribute execution_history.



13
14
15
# File 'lib/dynflow/execution_plan.rb', line 13

def execution_history
  @execution_history
end

#execution_timeObject (readonly)

Returns the value of attribute execution_time.



13
14
15
# File 'lib/dynflow/execution_plan.rb', line 13

def execution_time
  @execution_time
end

#idObject (readonly)

Returns the value of attribute id.



13
14
15
# File 'lib/dynflow/execution_plan.rb', line 13

def id
  @id
end

#labelObject (readonly)

Returns the value of attribute label.



13
14
15
# File 'lib/dynflow/execution_plan.rb', line 13

def label
  @label
end

#real_timeObject (readonly)

Returns the value of attribute real_time.



13
14
15
# File 'lib/dynflow/execution_plan.rb', line 13

def real_time
  @real_time
end

#started_atObject (readonly)

Returns the value of attribute started_at.



13
14
15
# File 'lib/dynflow/execution_plan.rb', line 13

def started_at
  @started_at
end

#stateObject (readonly)

Returns the value of attribute state.



13
14
15
# File 'lib/dynflow/execution_plan.rb', line 13

def state
  @state
end

Instance Method Details

#resultObject



35
36
37
# File 'lib/dynflow/execution_plan.rb', line 35

def result
  'N/A'
end

#valid?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/dynflow/execution_plan.rb', line 31

def valid?
  false
end