How Corticon Studio handles collections
- Last Updated: June 9, 2021
- 1 minute read
- Corticon
- Version 7.2
- Documentation
Support for using collections is extensive in Corticon Studio. The integration of collection support in the Rule Language is so seamless and complete that the rule modeler often discovers that rules are performing multiple evaluations on collections of data beyond what they anticipated! This is partly the point of a declarative environment. The rule modeler need only be concerned with what the rules do, rather than how they do it. How the system iterates or cycles through all the available data during rule execution should not be of concern.
As you saw in previous examples, a rule with term FlightPlan.aircraft was evaluated for every instance of FlightPlan.aircraft data delivered to the rule, either by a
message or by a Ruletest (which are really the same thing, because the Ruletest serves as
a quick and convenient way to create message payloads and send them to the rules). A rule
is expressed in Corticon Studio the same way
regardless of how many instances of data are to be evaluated by it. Contrast this to more
traditional procedural programming techniques, where for-do or
while-next type looping syntax is often required to ensure all relevant data is evaluated
by the logic.