fix: clarify flow branch outputs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
centdix
2026-04-09 15:57:12 +02:00
parent 66a6b6c731
commit 47044b1635
5 changed files with 80 additions and 0 deletions

View File

@@ -4279,6 +4279,22 @@ The OpenFlow schema (openflow.openapi.yaml) is the source of truth for flow stru
- \`flow_input.iter.value\` - Current item when inside a for-loop
- \`flow_input.iter.index\` - Current index when inside a for-loop
## Branch Output Rules
- For \`branchone\`, downstream steps should consume the branch step's result via \`results.branch_step_id\`
- Do NOT reference inner branch module ids from outside the branch container, such as \`results.branch_step_id.some_inner_step\`
- If later steps need a stable fulfillment/result object, make each branch return the same shape and read that from \`results.branch_step_id\`
Correct downstream access:
\`\`\`json
{"fulfillment": {"type": "javascript", "expr": "results.branch_on_inventory"}}
\`\`\`
Incorrect downstream access:
\`\`\`json
{"fulfillment": {"type": "javascript", "expr": "results.branch_on_inventory.create_shipment || results.branch_on_inventory.create_backorder"}}
\`\`\`
## Input Transforms
Every rawscript module needs \`input_transforms\` to map function parameters to values:

View File

@@ -40,6 +40,22 @@ The OpenFlow schema (openflow.openapi.yaml) is the source of truth for flow stru
- `flow_input.iter.value` - Current item when inside a for-loop
- `flow_input.iter.index` - Current index when inside a for-loop
## Branch Output Rules
- For `branchone`, downstream steps should consume the branch step's result via `results.branch_step_id`
- Do NOT reference inner branch module ids from outside the branch container, such as `results.branch_step_id.some_inner_step`
- If later steps need a stable fulfillment/result object, make each branch return the same shape and read that from `results.branch_step_id`
Correct downstream access:
```json
{"fulfillment": {"type": "javascript", "expr": "results.branch_on_inventory"}}
```
Incorrect downstream access:
```json
{"fulfillment": {"type": "javascript", "expr": "results.branch_on_inventory.create_shipment || results.branch_on_inventory.create_backorder"}}
```
## Input Transforms
Every rawscript module needs `input_transforms` to map function parameters to values:

View File

@@ -71,6 +71,22 @@ The OpenFlow schema (openflow.openapi.yaml) is the source of truth for flow stru
- \`flow_input.iter.value\` - Current item when inside a for-loop
- \`flow_input.iter.index\` - Current index when inside a for-loop
## Branch Output Rules
- For \`branchone\`, downstream steps should consume the branch step's result via \`results.branch_step_id\`
- Do NOT reference inner branch module ids from outside the branch container, such as \`results.branch_step_id.some_inner_step\`
- If later steps need a stable fulfillment/result object, make each branch return the same shape and read that from \`results.branch_step_id\`
Correct downstream access:
\`\`\`json
{"fulfillment": {"type": "javascript", "expr": "results.branch_on_inventory"}}
\`\`\`
Incorrect downstream access:
\`\`\`json
{"fulfillment": {"type": "javascript", "expr": "results.branch_on_inventory.create_shipment || results.branch_on_inventory.create_backorder"}}
\`\`\`
## Input Transforms
Every rawscript module needs \`input_transforms\` to map function parameters to values:

View File

@@ -45,6 +45,22 @@ The OpenFlow schema (openflow.openapi.yaml) is the source of truth for flow stru
- `flow_input.iter.value` - Current item when inside a for-loop
- `flow_input.iter.index` - Current index when inside a for-loop
## Branch Output Rules
- For `branchone`, downstream steps should consume the branch step's result via `results.branch_step_id`
- Do NOT reference inner branch module ids from outside the branch container, such as `results.branch_step_id.some_inner_step`
- If later steps need a stable fulfillment/result object, make each branch return the same shape and read that from `results.branch_step_id`
Correct downstream access:
```json
{"fulfillment": {"type": "javascript", "expr": "results.branch_on_inventory"}}
```
Incorrect downstream access:
```json
{"fulfillment": {"type": "javascript", "expr": "results.branch_on_inventory.create_shipment || results.branch_on_inventory.create_backorder"}}
```
## Input Transforms
Every rawscript module needs `input_transforms` to map function parameters to values:

View File

@@ -40,6 +40,22 @@ The OpenFlow schema (openflow.openapi.yaml) is the source of truth for flow stru
- `flow_input.iter.value` - Current item when inside a for-loop
- `flow_input.iter.index` - Current index when inside a for-loop
## Branch Output Rules
- For `branchone`, downstream steps should consume the branch step's result via `results.branch_step_id`
- Do NOT reference inner branch module ids from outside the branch container, such as `results.branch_step_id.some_inner_step`
- If later steps need a stable fulfillment/result object, make each branch return the same shape and read that from `results.branch_step_id`
Correct downstream access:
```json
{"fulfillment": {"type": "javascript", "expr": "results.branch_on_inventory"}}
```
Incorrect downstream access:
```json
{"fulfillment": {"type": "javascript", "expr": "results.branch_on_inventory.create_shipment || results.branch_on_inventory.create_backorder"}}
```
## Input Transforms
Every rawscript module needs `input_transforms` to map function parameters to values: