Portal Community

Rules vs. Conditions

ApproachUse WhenWho Manages Logic
Condition node (expression)Simple true/false branching based on a value comparisonWorkflow designer — logic in node config
Rule Evaluation nodeComplex multi-variable decisions, compliance rules, policy checksBusiness analysts — logic in rule admin (outside the workflow)

How It Works


WorkflowNode (RuleEvalNode)
    │ inputMap → fact object
    ▼
IRuleEngineClient.EvaluateAsync(ruleSetId, facts, tenantId)
    │
    ▼
Rule Engine Service
    ├── Fires matching rules
    ├── Computes outcome
    └── Returns explanation
    │
    ▼
NodeExecutionResult
    ├── outcome: "approved" → approved port
    ├── outcome: "rejected" → rejected port
    └── outcome: "review"  → review port
  

Rule Output Shape

{
  "outcome": "approved",
  "firedRules": ["amount-within-limit", "vendor-approved", "category-allowed"],
  "explanation": "Invoice total 4750 GBP is within the 5000 GBP limit for category 'consulting'.",
  "score": 85,
  "evaluatedAt": "2026-05-25T10:00:00Z"
}
Separation of concerns: Rule sets are managed in the Rules admin — business analysts can update approval thresholds, category lists, and compliance rules without touching the workflow. The workflow only changes when the routing structure changes, not when business rules change.