How Can We Help?
A sub-routine is a series that is not sold directly but is reused by other
series’ configuration: an Options Sub-Routine is attached to options, a
Rules Sub-Routine is fired by rules.
What, where, who, when, why
| What | The same Series screen opened in sub-routine mode — create/edit reusable option bundles and rule libraries, and mark one Global with a shared segment ID. |
| Where | Administration → OJ Setup → Product Setup → Sub-Routines. |
| Who | The rules owner — sub-routines are configurator plumbing, not a sales concern. |
| When | When the same option bundle or rule set is pasted into series after series: factor it into one sub-routine and reference it instead. A Global segment is created once, OpenJanela-wide. |
| Why it matters | One edit in the sub-routine fixes every series that references it — the alternative is N copies drifting apart. Note the list here also shows inactive records (see the quirk below). |
The Sub-Routines screen is the same screen as Series, opened in sub-routine mode —
the layout, Header tab, detail tabs, Copy, and Delete all work as described in
Series. The differences:
- The list shows only sub-routines.
- A New record defaults to Options Sub-Routine if you don’t pick a
radio. - The Global checkbox + ID field (Header ▸ Identity & Category) are
the point of this screen: a sub-routine marked Global with a segment ID maps to a
shared, OpenJanela-wide segment.
Quirk: unlike the Series list, the Sub-Routines list also shows inactive
records (soft-deleted or unticked Active). A “deleted” sub-routine remaining
visible here is expected behavior.
The series table: sub-routine columns
A sub-routine is just a row of the tenant series table. Two columns make it
one:
| Column | Values | Meaning |
|---|---|---|
isseg |
0 | “Not Sub-Routine” — a normal, sellable product series (shown on the Series screen). |
| 1 | “Options Sub-Routine” — a reusable bundle of option rules, referenced from other series via an OptionSegment rule (type 3). |
|
| 2 | “Rules Sub-Routine” — a reusable library of rules, referenced from other series via a Rule Segment rule (type 9). By far the most common kind. |
|
globalsegid |
integer | “Global segment ID” — behind the Header Global checkbox + ID field. Legacy: 0 in every row of every tenant database, with no lookup table behind it; the only remaining use is a boolean-style > 0 check in the designer’s drawing code (a butt-weldbehavior flip). The field exists for OpenJanela-global segment mapping but is effectively unused. |
How sub-routines are consumed
A main series links to a sub-routine through a rule of its own, not through a
foreign key on series: a type 3 OptionSegment rule pulls in an Options
Sub-Routine, a type 9 Rule Segment rule pulls in a Rules Sub-Routine, and in both
cases the rule’s Value 1 holds the sub-routine’s series id. When a product of the
main series is configured, the server collects those referenced sub-routines and the
sub-routine’s own rules (or option rules) run as if they belonged to the main
series — write a rule set once, reuse it from many series. The Rules tab of this
screen is where the sub-routine’s own rules are maintained.