The concept of scope is key to rule design and execution. Scope in a Rulesheet helps define or constrain which data is included in rule processing, and which data is excluded. If a rule uses the Vocabulary term FlightPlan.cargo.weight, then we know that those FlightPlan entities without associated Cargo entities will be ignored.

You also know that Vocabulary root-level entities – FlightPlan, for example – bring every instance of the entity into scope. This means that a rule using root-level FlightPlan acts on every instance of FlightPlan, including Cargo.flightPlan, and Aircraft.flightPlan, or any other role using FlightPlan that may exist in our Vocabulary.

When you add the ability for the Corticon Server and Studio to dynamically retrieve data from a database, rule scope determines which data to retrieve. This is exactly the same concept as Studio determining which data in an Input Ruletest to process and which to ignore based upon a rule’s scope. So, if you write rules using root-level FlightPlan, then the Studio processes all FlightPlans in the Input Ruletest during rule execution.