Repository navigation
feat(wf nested condition): allow nested condition on gateway step - #2064
Conversation
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (2)
🛟 Help
|
2f61628 to
bf29fb2
Compare
christophebrun-forest
left a comment
There was a problem hiding this comment.
No blocker. Three small points below.
Package docs: packages/workflow-executor/CLAUDE.md:40 still says "Top-to-bottom, first-match-wins, and/or aggregator". It should also say that:
- an option's conditions can hold
and/orgroups, nested at any depth; - an empty group is rejected at the schema boundary;
- each group entry in
evaluations[].conditionscarries its ownmetand the results of its ownconditions.
# @forestadmin/workflow-executor [1.36.0](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/workflow-executor@1.35.8...@forestadmin/workflow-executor@1.36.0) (2026-11-10) ### Features * **wf nested condition:** allow nested condition on gateway step ([#2064](#2064)) ([aa0c257](aa0c257))
Resolves the conflict with #2064 (nested condition groups): - the server condition node carries `sourceType`, nullable like the schema; - a condition node is dispatched on its shape instead of through z.union, so an unknown source type, operator or sub-workflow End rule names the field at fault instead of a bare "Invalid input"; - tests cover a sub-workflow End condition inside a group, mixed with Get Data, and a second call of a workflow not seeing the Ends of the first. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Definition of Done
Fixes PRD-1171
General
Security
Note
Add nested
and/orcondition groups to deterministic condition-step optionsCondition step options in gateway steps now accept recursive
and/orgroups, not just flat condition lists.aggregator(and/or).ConditionStepExecutor.evaluateGrouprecursively evaluates each child and aggregates per level, recording nested results and not-loaded reasons in the evaluation trace (condition-step-executor.ts).ConditionEvaluation.conditionsnow uses the new recursiveConditionResulttype (step-execution-data.ts); server-side types mirror the shape (server-types.ts).ConditionEvaluation.conditionssee the new nestedConditionResultshape instead of the previous flat inline fields.Changes since #2064 opened
workflow-executorinto a discriminated union of leaf and group results [b8b7d99]ConditionStepExecutorAI decision tests inworkflow-executorfor group evaluation [b8b7d99]workflow-executordocumentation to cover nested condition groups [b8b7d99]Macroscope summarized 0c53a99.