Class: SpotFlow::Bpmn::ErrorEventDefinition
- Inherits:
-
EventDefinition
- Object
- Element
- EventDefinition
- SpotFlow::Bpmn::ErrorEventDefinition
- Defined in:
- lib/spot_flow/bpmn/event_definition.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#error_code_variable ⇒ Object
Returns the value of attribute error_code_variable.
-
#error_message_variable ⇒ Object
Returns the value of attribute error_message_variable.
-
#error_ref ⇒ Object
Returns the value of attribute error_ref.
Attributes inherited from Element
#extension_elements, #id, #name
Instance Method Summary collapse
- #error_id ⇒ Object
- #error_name ⇒ Object
- #execute(execution) ⇒ Object
-
#initialize(attributes = {}) ⇒ ErrorEventDefinition
constructor
A new instance of ErrorEventDefinition.
Methods inherited from Element
Constructor Details
#initialize(attributes = {}) ⇒ ErrorEventDefinition
Returns a new instance of ErrorEventDefinition.
29 30 31 32 33 34 35 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 29 def initialize(attributes = {}) super(attributes.except(:error_ref, :error_code_variable, :error_message_variable)) @error_ref = attributes[:error_ref] @error_code_variable = attributes[:error_code_variable] = attributes[:error_message_variable] end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
26 27 28 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 26 def error @error end |
#error_code_variable ⇒ Object
Returns the value of attribute error_code_variable.
27 28 29 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 27 def error_code_variable @error_code_variable end |
#error_message_variable ⇒ Object
Returns the value of attribute error_message_variable.
27 28 29 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 27 def end |
#error_ref ⇒ Object
Returns the value of attribute error_ref.
26 27 28 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 26 def error_ref @error_ref end |
Instance Method Details
#error_id ⇒ Object
45 46 47 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 45 def error_id error&.id end |
#error_name ⇒ Object
49 50 51 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 49 def error_name error&.name end |
#execute(execution) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 37 def execute(execution) if execution.step.is_throwing? execution.throw_error(error_name) else execution.error_names.push error_name end end |