Evaluation Type Rules

Returns a boolean result without executing actions. Supports Rule-Based Data Filtering.

Purpose

Evaluate a condition tree against a source object and produce a boolean decision. Typical uses include eligibility checks, segmentation, routing, pricing tiers, KYC/AML gates, underwriting criteria, and feature flags.

Engine Behavior

  • Compiles the rule into a predicate over the source type; evaluation yields true or false.
  • Supports Data Filtering: apply the same rule as a LINQ predicate via Filter(..) method to filter IEnumerable<T> / IQueryable<T> sources.
  • Supports Reusable Rules; circular references are blocked by automatic validation built into the Rule Editor.
  • Authoring/evaluation semantics are identical whether the source surface comes from a .NET class, Source XML, or FlexSource.

C# — Single Evaluation

using CodeEffects.Rule.Engine;

bool isApproved = new Evaluator<Application>(ruleXml).Evaluate(app);

LINQ — Data Filtering

var filteredData = data.Filter(ruleXml); // IEnumerable<T> or IQueryable<T>

Authoring Surface

  • Fields, operators, constants, in‑rule methods (methods exposed as fields), numeric calculations, and parentheses/grouping.
  • Actions are disabled for evaluation type rules.

Best Practices

  • Prefer evaluation when a pure decision is sufficient; this keeps authoring simple.
  • Encapsulate complexity using in‑rule methods instead of exposing infrastructure fields.

p101

p102

l097 --

l102

p101

×