Find business rules as decision tables

Proprietary

Extract the rules a program applies, as normalised decision tables. Each action worth calling a business rule — a field whose value leaves the program, a record written, a program called, a segment inserted — is sliced backwards to the conditions that decide it: the IF and EVALUATE branches it sits under, and the conditions its paragraph inherits from wherever control reached it. Conditions are normalised so that the same test written three ways becomes one column: 88 level condition names are expanded to the test they stand for, NOT is folded into the operator, OR is multiplied out so each rule is a conjunction, and a field is named where its value came from rather than the work field it was copied into. Because the result is a table rather than prose, it can be checked: rules whose conditions exclude each other, rules nothing reaches, and rules an earlier one has already decided are reported. A condition too tangled to decompose is kept as written rather than dropped, since a table that quietly omitted one would be worse than no table.

io.moderne.mainframe.rules.FindBusinessRules

Optional

includeInternalFieldsBoolean

Whether to report rules deciding fields whose value never leaves the program. They are off by default because a work field set under a condition is usually scaffolding rather than a rule. Defaults to false.

mod run . --recipe=io.moderne.mainframe.rules.FindBusinessRules

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.