Allow Operator overloading and chaining to make SCL more intuitive for technicians
Story
- At the minute all operators are purely infix
- We only allow two arguments e.g.
1 + 2but not1 + 2 + 3 - To use multiple arguments, technicians need to use multiple nested brackets 1 + (2 + (3 + 4))
- We need to fix this by supporting operator chaining
- Steps that use operators should take a list of steps as arguments
- This will require a complete rework of all the steps that currently use operators
- Instead of ApplyMathOperator we will need to have separate methods for each operator (e.g.
Sum,Productetc) - The same applies for ApplyBooleanOperator and Compare
- We should also support operator overloading so
+could meanSum,StringConcatenate, orEntityCombinedepending on the context
Changelog Summary
- Removed
ApplyMathOperator,ApplyBooleanOperator,Compare - Removed
withkeyword - Added
Sum,Product,Subtract,Divide,ModuloPower - Added
And,Or - Added
Equals,NotEquals,LessThan,LessThanOrEqual,GreaterThan,GreaterThanOrEqual - All operators can now be chained
-
+operator can now be used forSum,StringConcatenate, orEntityCombine
Edited by Mark Wainwright