Class: BPMN::TimerEventDefinition

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 = {}) ⇒ TimerEventDefinition

Returns a new instance of TimerEventDefinition.



107
108
109
110
111
112
# File 'lib/bpmn/event_definition.rb', line 107

def initialize(attributes = {})
  super(attributes.except(:time_date, :time_duration, :time_cycle))

  @time_duration_type = attributes[:time_duration_type]
  @time_duration = attributes[:time_duration]
end

Instance Attribute Details

#time_cycleObject

Returns the value of attribute time_cycle.



105
106
107
# File 'lib/bpmn/event_definition.rb', line 105

def time_cycle
  @time_cycle
end

#time_dateObject

Returns the value of attribute time_date.



105
106
107
# File 'lib/bpmn/event_definition.rb', line 105

def time_date
  @time_date
end

#time_durationObject

Returns the value of attribute time_duration.



105
106
107
# File 'lib/bpmn/event_definition.rb', line 105

def time_duration
  @time_duration
end

#time_duration_typeObject

Returns the value of attribute time_duration_type.



105
106
107
# File 'lib/bpmn/event_definition.rb', line 105

def time_duration_type
  @time_duration_type
end

Instance Method Details

#execute(execution) ⇒ Object



114
115
116
117
118
# File 'lib/bpmn/event_definition.rb', line 114

def execute(execution)
  if execution.step.is_catching?
    execution.timer_expires_at = time_due
  end
end