Once interfaced with EDC, the amount of test data is no longer limited to that contained in a single Input Ruletest. It is limited by the sizes in the connected database. Rules using root-level FlightPlan (or any other root-level entity) forces the Server or Studio to retrieve all FlightPlan entities (records) from the database. If the database is very large, then that will mean a large amount of data is retrieved. For this reason, database access for root-level rules is turned off by default. This ensures that you do not accidentally force the Server to perform extremely large and time-consuming data retrievals from the database unless you explicitly require it.

Because database access for rules using root-level terms is disabled by default, you need to know how to enable it for those circumstances when you do want it. This is called extending a root-level entity to the database. To illustrate, a simple rule based on the Cargo project's Vocabulary is used, as follows:

  1. In Corticon Studio, create a new Rulesheet in the Cargo project, and open its advanced view.
  2. Drag from the Vocabulary into the Scope as shown, including adding Cargo.weight to the FlightPlan association as shown.
  3. Add the aliases in the Scope as shown.
  4. Write the rule condition and its values in columns 1 and 2.
  5. Add the rule statement as shown.
  6. Save the Rulesheet as CargoLoad.ers.
Figure 1. CargoLoad Rulesheet

The Rulesheet shown adds up (sums) the collection (see Collections) of Cargo weights associated with a FlightPlan (load.weight) and compares this to the maxCargoWeight of the root-level Aircraft. The intention is to perform this comparison for every available Aircraft, so the root-level Aircraft in our Conditional expression was used. Any Aircraft whose maxCargoWeight is inadequate is identified with a posted Violation message.