Class: SpotFlow::Bpmn::EventBasedGateway

Inherits:
Gateway show all
Defined in:
lib/spot_flow/bpmn/gateway.rb

Instance Attribute Summary

Attributes inherited from Step

#default, #default_ref, #incoming, #outgoing

Attributes inherited from Element

#extension_elements, #id, #name

Instance Method Summary collapse

Methods inherited from Gateway

#execute, #is_enabled?

Methods inherited from Step

#converging?, #diverging?, #initialize, #input_mappings, #leave, #outgoing_flows, #output_mappings

Methods inherited from Element

#initialize, #inspect

Constructor Details

This class inherits a constructor from SpotFlow::Bpmn::Step

Instance Method Details

#cancel_waiting_events(execution) ⇒ Object

RULE: when an event created from an event gateway is caught, all other waiting events must be canceled.



78
79
80
81
82
# File 'lib/spot_flow/bpmn/gateway.rb', line 78

def cancel_waiting_events(execution)
  execution.targets.each do |target_execution|
    target_execution.terminate unless target_execution.ended?
  end
end