Class: BPMN::EscalationEventDefinition
- Inherits:
-
EventDefinition
- Object
- Element
- EventDefinition
- BPMN::EscalationEventDefinition
- Defined in:
- lib/bpmn/event_definition.rb
Instance Attribute Summary collapse
-
#escalation ⇒ Object
Returns the value of attribute escalation.
-
#escalation_ref ⇒ Object
Returns the value of attribute escalation_ref.
Attributes inherited from Element
#extension_elements, #id, #name
Instance Method Summary collapse
- #escalation_id ⇒ Object
- #escalation_name ⇒ Object
- #execute(execution) ⇒ Object
-
#initialize(attributes = {}) ⇒ EscalationEventDefinition
constructor
A new instance of EscalationEventDefinition.
Methods inherited from Element
Constructor Details
#initialize(attributes = {}) ⇒ EscalationEventDefinition
Returns a new instance of EscalationEventDefinition.
24 25 26 27 28 |
# File 'lib/bpmn/event_definition.rb', line 24 def initialize(attributes = {}) super(attributes.except(:escalation_ref)) @escalation_ref = attributes[:escalation_ref] end |
Instance Attribute Details
#escalation ⇒ Object
Returns the value of attribute escalation.
22 23 24 |
# File 'lib/bpmn/event_definition.rb', line 22 def escalation @escalation end |
#escalation_ref ⇒ Object
Returns the value of attribute escalation_ref.
22 23 24 |
# File 'lib/bpmn/event_definition.rb', line 22 def escalation_ref @escalation_ref end |
Instance Method Details
#escalation_id ⇒ Object
38 39 40 |
# File 'lib/bpmn/event_definition.rb', line 38 def escalation_id escalation&.id end |
#escalation_name ⇒ Object
42 43 44 |
# File 'lib/bpmn/event_definition.rb', line 42 def escalation_name escalation&.name end |
#execute(execution) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/bpmn/event_definition.rb', line 30 def execute(execution) if execution.step.is_throwing? execution.throw_escalation(escalation_name) else execution.escalation_names.push escalation_name end end |