sclass ExecutedRule { RuleWithParams rule; // may be a FailedRule LS output; LS facts; LS newInput; transient NLLogicChecker_v2 logicChecker; // logic checker used int _failureLevel; // or 0 *() {} *(RuleWithParams *rule, Collection output, Collection facts, Collection newInput) { this.output = asList_nullIfEmpty(output); this.facts = asList_nullIfEmpty(facts); this.newInput = asList_nullIfEmpty(newInput); } int failureLevel() { if (_failureLevel != 0) ret _failureLevel; if (rule instanceof FailedRule) _failureLevel = nlLogic_failureLevel_calc(this); ret _failureLevel; } S ruleID() { ret rule.ruleID(); } bool isFailed() { ret rule instanceof FailedRule; } }