How Can We Help?
A rule is the unit of product configuration in OpenJanela. Every part that
lands on a Bill of Materials, every clearance, every grid, every machining notch, and most of the
cost is put there by a rule. Learning to think in rules is the single most useful skill for
configuring a product series. This chapter teaches that mental model; the Notching chapters that
follow apply it to machining.
A rule does nothing on its own. It is matched against every part of the unit’s design tree
(frame → opening → sash → glass → …). When it matches a node, it runs its action on that node.
Which node a rule matches is decided by its Level. Get the Level right and everything else is
just parameters. Most “the rule misbehaves” problems are really “the rule attached to the wrong node”.
Authored in one place, executed in another
Rules are written in the setup / admin application (the rule editor), and executed
at runtime when an item is drawn and its BOM is built. Rules are stored per series — a rule
written for one product line never affects another. Editing a rule changes how every future unit in
that series is built.
What happens when an item is built
- The configurator walks the design tree of the unit, node by node.
- For each node it asks every rule in the series: does your Level match this node?
(the matching test — see Levels & binding). - If a rule matches and its conditions pass, the engine runs the rule’s action on that
node — add a part, set a size/clearance, cut a notch, set a grid, add cost, and so on.
The families of rule (by Rule Type)
The Rule Type chooses what kind of thing the rule does. The main families:
| Family | What it does |
|---|---|
| Option | Sets / restricts a design option answer (colour, size, hardware choice). |
| Part | Adds a part to the BOM — fixed, or sized from a matrix / option / expression. |
| Clearance | Sets a gap/depth between members (frame-to-sash, glass-to-bead). |
| Grid | Sets the number, style, thickness and material of grid bars. |
| Machining / Notch | Cuts a notch or machining operation at a position — see the Notching chapters. |
| Assembly / Supply / Cost | Production line, station, supplier, markups, stages, NFRC values, etc. |
The exact rule-type numbers and what each notch type does are listed in the
Rule-type reference.