Class: SpotFlow::Bpmn::TimerEventDefinition
- Inherits:
-
EventDefinition
- Object
- Element
- EventDefinition
- SpotFlow::Bpmn::TimerEventDefinition
- Defined in:
- lib/spot_flow/bpmn/event_definition.rb
Instance Attribute Summary collapse
-
#time_cycle ⇒ Object
Returns the value of attribute time_cycle.
-
#time_date ⇒ Object
Returns the value of attribute time_date.
-
#time_duration ⇒ Object
Returns the value of attribute time_duration.
-
#time_duration_type ⇒ Object
Returns the value of attribute time_duration_type.
Attributes inherited from Element
#extension_elements, #id, #name
Instance Method Summary collapse
- #execute(execution) ⇒ Object
-
#initialize(attributes = {}) ⇒ TimerEventDefinition
constructor
A new instance of TimerEventDefinition.
Methods inherited from Element
Constructor Details
#initialize(attributes = {}) ⇒ TimerEventDefinition
Returns a new instance of TimerEventDefinition.
108 109 110 111 112 113 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 108 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_cycle ⇒ Object
Returns the value of attribute time_cycle.
106 107 108 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 106 def time_cycle @time_cycle end |
#time_date ⇒ Object
Returns the value of attribute time_date.
106 107 108 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 106 def time_date @time_date end |
#time_duration ⇒ Object
Returns the value of attribute time_duration.
106 107 108 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 106 def time_duration @time_duration end |
#time_duration_type ⇒ Object
Returns the value of attribute time_duration_type.
106 107 108 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 106 def time_duration_type @time_duration_type end |
Instance Method Details
#execute(execution) ⇒ Object
115 116 117 118 119 |
# File 'lib/spot_flow/bpmn/event_definition.rb', line 115 def execute(execution) if execution.step.is_catching? execution.timer_expires_at = time_due end end |