Class: BPMN::SequenceFlow
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.
31 32 33 34 35 |
# File 'lib/bpmn/flow.rb', line 31 def initialize(attributes = {}) super(attributes.except(:condition)) @condition = attributes[:condition_expression] end |
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
29 30 31 |
# File 'lib/bpmn/flow.rb', line 29 def condition @condition end |
Instance Method Details
#evaluate(execution) ⇒ Object
37 38 39 40 |
# File 'lib/bpmn/flow.rb', line 37 def evaluate(execution) return true unless condition execution.evaluate_condition(condition) end |