Class OpenWFE::ProcessError
In: lib/openwfe/expool/errorjournal.rb
Parent: Object

Encapsulating process error information.

Instances of this class may be used to replay_at_error

Methods

==   hash   new   parent_wfid   to_s   wfid  

Attributes

date  [R]  When did the error occur.
error_class  [R]  The error class (String) of the top level error
fei  [R]  The FlowExpressionId instance uniquely pointing at the expression which ‘failed’.
message  [R]  Generally something like :apply or :reply
stacktrace  [R]  The String stack trace of the error.
workitem  [R]  The workitem accompanying the message (apply(workitem) / reply (workitem)).

Public Class methods

[Source]

    # File lib/openwfe/expool/errorjournal.rb, line 89
89:         def initialize (*args)
90: 
91:             @date = Time.new
92:             @fei, @message, @workitem, @error_class, @stacktrace = args
93:         end

Public Instance methods

Returns true if the other instance is a ProcessError and is the same error as this one.

[Source]

     # File lib/openwfe/expool/errorjournal.rb, line 134
134:         def == (other)
135:             return false unless other.is_a?(ProcessError)
136:             return to_s == other.to_s
137:                 #
138:                 # a bit costly but as it's only used by resume_process()...
139:         end

Returns a hash

[Source]

     # File lib/openwfe/expool/errorjournal.rb, line 124
124:         def hash
125:             to_s.hash
126:                 #
127:                 # a bit costly but as it's only used by resume_process()...
128:         end
parent_wfid()

Alias for wfid

Produces a human readable version of the information in the ProcessError instance.

[Source]

     # File lib/openwfe/expool/errorjournal.rb, line 109
109:         def to_s
110:             s = ""
111:             s << "-- #{self.class.name} --\n"
112:             s << "     date :        #{@date}\n"
113:             s << "     fei :         #{@fei}\n"
114:             s << "     message :     #{@message}\n"
115:             s << "     workitem :    ...\n"
116:             s << "     error_class : #{@error_class}\n"
117:             s << "     stacktrace :  #{@stacktrace[0, 80]}\n"
118:             s
119:         end

Returns the parent workflow instance id (process id) of this ProcessError instance.

[Source]

     # File lib/openwfe/expool/errorjournal.rb, line 99
 99:         def wfid
100:             @fei.parent_wfid
101:         end

[Validate]