Parent

Class/Module Index [+]

Quicksearch

Ruote::ProcessError

Encapsulating all the information about an error in a process instance.

Public Class Methods

new(h) click to toggle source
# File lib/ruote/engine/process_error.rb, line 33
def initialize (h)
  @h = h
end

Public Instance Methods

action() click to toggle source

'apply', 'reply', 'receive', ... Indicates in which "direction" the error occured.

# File lib/ruote/engine/process_error.rb, line 75
def action
  @h['msg']['action']
end
at() click to toggle source
# File lib/ruote/engine/process_error.rb, line 57
def at
  @h['msg']['put_at']
end
fei() click to toggle source
# File lib/ruote/engine/process_error.rb, line 49
def fei
  Ruote::FlowExpressionId.new(msg['fei'])
end
fields() click to toggle source

Exposes the workitem fields directly.

# File lib/ruote/engine/process_error.rb, line 81
def fields
  @h['msg']['workitem']['fields']
end
message() click to toggle source
# File lib/ruote/engine/process_error.rb, line 37
def message
  @h['message']
end
msg() click to toggle source
# File lib/ruote/engine/process_error.rb, line 45
def msg
  @h['msg']
end
to_h() click to toggle source
# File lib/ruote/engine/process_error.rb, line 68
def to_h
  @h
end
trace() click to toggle source
# File lib/ruote/engine/process_error.rb, line 41
def trace
  @h['trace']
end
tree() click to toggle source
# File lib/ruote/engine/process_error.rb, line 53
def tree
  @h['msg']['tree']
end
tree=(t) click to toggle source

A shortcut for modifying the tree of an expression when it has had an error upon being applied.

# File lib/ruote/engine/process_error.rb, line 64
def tree= (t)
  @h['msg']['tree'] = t
end

Protected Instance Methods

to_dot(opts) click to toggle source
# File lib/ruote/engine/process_error.rb, line 87
def to_dot (opts)

  i = fei.to_storage_id
  label = "error : #{message.gsub(/"/, "'")}"

  [
    "\"err_#{i}\" [ label = \"#{label}\" ];",
    "\"err_#{i}\" -> \"#{i}\" [ style = \"dotted\" ];"
  ]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.