Class: SpotFlow::Bpmn::SequenceFlow
- Defined in:
- lib/spot_flow/bpmn/flow.rb
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
Attributes inherited from Flow
#source, #source_ref, #target, #target_ref
Attributes inherited from Element
#extension_elements, #id, #name
Instance Method Summary collapse
- #evaluate(execution) ⇒ Object
-
#initialize(attributes = {}) ⇒ SequenceFlow
constructor
A new instance of SequenceFlow.
Methods inherited from Flow
Methods inherited from Element
Constructor Details
#initialize(attributes = {}) ⇒ SequenceFlow
Returns a new instance of SequenceFlow.
32 33 34 35 36 |
# File 'lib/spot_flow/bpmn/flow.rb', line 32 def initialize(attributes = {}) super(attributes.except(:condition)) @condition = attributes[:condition_expression] end |
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
30 31 32 |
# File 'lib/spot_flow/bpmn/flow.rb', line 30 def condition @condition end |
Instance Method Details
#evaluate(execution) ⇒ Object
38 39 40 41 |
# File 'lib/spot_flow/bpmn/flow.rb', line 38 def evaluate(execution) return true unless condition execution.evaluate_condition(condition) end |