Class: SpotFlow::Bpmn::BoundaryEvent
- Defined in:
- lib/spot_flow/bpmn/event.rb
Instance Attribute Summary collapse
-
#attached_to ⇒ Object
Returns the value of attribute attached_to.
-
#attached_to_ref ⇒ Object
Returns the value of attribute attached_to_ref.
-
#cancel_activity ⇒ Object
Returns the value of attribute cancel_activity.
Attributes inherited from Event
Attributes inherited from Step
#default, #default_ref, #incoming, #outgoing
Attributes inherited from Element
#extension_elements, #id, #name
Instance Method Summary collapse
- #execute(execution) ⇒ Object
-
#initialize(attributes = {}) ⇒ BoundaryEvent
constructor
A new instance of BoundaryEvent.
- #is_catching? ⇒ Boolean
- #signal(execution) ⇒ Object
Methods inherited from Event
#conditional_event_definition, #error_event_definition, #error_event_definitions, #escalation_event_definition, #event_definition_ids, #is_conditional?, #is_error?, #is_escalation?, #is_message?, #is_none?, #is_signal?, #is_terminate?, #is_throwing?, #is_timer?, #message_event_definitions, #signal_event_definitions, #terminate_event_definition, #timer_event_definition
Methods inherited from Step
#converging?, #diverging?, #input_mappings, #leave, #outgoing_flows, #output_mappings
Methods inherited from Element
Constructor Details
#initialize(attributes = {}) ⇒ BoundaryEvent
Returns a new instance of BoundaryEvent.
158 159 160 161 162 163 164 165 166 |
# File 'lib/spot_flow/bpmn/event.rb', line 158 def initialize(attributes = {}) super(attributes.except(:attached_to_ref, :cancel_activity)) @attached_to_ref = attributes[:attached_to_ref] @cancel_activity = true if attributes[:cancel_activity].present? @cancel_activity = attributes[:cancel_activity] == "false" ? false : true end end |
Instance Attribute Details
#attached_to ⇒ Object
Returns the value of attribute attached_to.
156 157 158 |
# File 'lib/spot_flow/bpmn/event.rb', line 156 def attached_to @attached_to end |
#attached_to_ref ⇒ Object
Returns the value of attribute attached_to_ref.
156 157 158 |
# File 'lib/spot_flow/bpmn/event.rb', line 156 def attached_to_ref @attached_to_ref end |
#cancel_activity ⇒ Object
Returns the value of attribute cancel_activity.
156 157 158 |
# File 'lib/spot_flow/bpmn/event.rb', line 156 def cancel_activity @cancel_activity end |
Instance Method Details
#execute(execution) ⇒ Object
172 173 174 175 |
# File 'lib/spot_flow/bpmn/event.rb', line 172 def execute(execution) super execution.wait end |
#is_catching? ⇒ Boolean
168 169 170 |
# File 'lib/spot_flow/bpmn/event.rb', line 168 def is_catching? true end |
#signal(execution) ⇒ Object
177 178 179 180 |
# File 'lib/spot_flow/bpmn/event.rb', line 177 def signal(execution) execution.attached_to.terminate if cancel_activity leave(execution) end |