Class: BPMN::EscalationEventDefinition

Inherits:
EventDefinition show all
Defined in:
lib/bpmn/event_definition.rb

Instance Attribute Summary collapse

Attributes inherited from Element

#extension_elements, #id, #name

Instance Method Summary collapse

Methods inherited from Element

#inspect

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

#escalationObject

Returns the value of attribute escalation.



22
23
24
# File 'lib/bpmn/event_definition.rb', line 22

def escalation
  @escalation
end

#escalation_refObject

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_idObject



38
39
40
# File 'lib/bpmn/event_definition.rb', line 38

def escalation_id
  escalation&.id
end

#escalation_nameObject



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