pub fn execute_chain(
rules: &[RuleDefinition],
initial_context_json: &str,
) -> RuleEngineResult<(Value, Value)>Expand description
Execute a sequence of rules where the output of each rule is merged into
the context for the next rule (output → "decision" key injection).
The final context — with "decision" set to the last rule’s output — is
returned together with the last result value. This enables decision
pipelines such as:
score-rule→ output"approve"→ injected as{"decision": "approve"}limit-rulereads{"var": "decision"}and{"var": "amount"}→ final answer
Returns an error if any rule in the chain fails.