@uipath/skills 1.200.0 → 1.201.0-preview.433
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +32 -0
- package/CODEOWNERS +25 -4
- package/README.md +1 -0
- package/assets/skill-status.json +8 -0
- package/assets/uip-catalog-snapshot.json +113 -41
- package/assets/uipath-icon.png +0 -0
- package/commands/install-permissions.md +1 -0
- package/package.json +3 -2
- package/skills/uipath-admin/SKILL.md +1 -1
- package/skills/uipath-admin/references/authorization/permission-catalog.md +61 -1
- package/skills/uipath-admin/references/authorization/role-management.md +3 -1
- package/skills/uipath-admin/references/diagnose/references/failure-modes.md +29 -4
- package/skills/uipath-admin/references/diagnose/references/troubleshooting-guide.md +13 -0
- package/skills/uipath-agents/SKILL.md +1 -0
- package/skills/uipath-agents/references/coded/capabilities/context-grounding.md +3 -3
- package/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails-recommend.md +6 -1
- package/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails.md +89 -1
- package/skills/uipath-agents/references/coded/embedding-in-flows.md +17 -1
- package/skills/uipath-agents/references/coded/frameworks/llamaindex-integration.md +64 -2
- package/skills/uipath-agents/references/coded/lifecycle/deployment.md +3 -0
- package/skills/uipath-agents/references/coded/lifecycle/environment-variables.md +90 -0
- package/skills/uipath-agents/references/coded/lifecycle/file-sync.md +3 -1
- package/skills/uipath-agents/references/coded/quickstart.md +10 -6
- package/skills/uipath-agents/references/lowcode/capabilities/guardrails/guardrails-recommend.md +20 -5
- package/skills/uipath-agents/references/lowcode/capabilities/guardrails/guardrails.md +13 -0
- package/skills/uipath-agents/references/lowcode/capabilities/inline-in-flow/inline-in-flow.md +1 -3
- package/skills/uipath-api-workflow/references/operating-published-workflows.md +17 -6
- package/skills/uipath-automationhub/SKILL.md +58 -0
- package/skills/uipath-automationhub/references/api-endpoints.md +140 -0
- package/skills/uipath-automationhub/references/get-process.md +69 -0
- package/skills/uipath-automationhub/references/publish-process.md +171 -0
- package/skills/uipath-coded-apps/SKILL.md +24 -11
- package/skills/uipath-coded-apps/references/commands-reference.md +29 -29
- package/skills/uipath-coded-apps/references/create-action-app.md +4 -0
- package/skills/uipath-coded-apps/references/create-web-app.md +10 -0
- package/skills/uipath-coded-apps/references/debug.md +16 -0
- package/skills/uipath-coded-apps/references/oauth-client-setup.md +3 -1
- package/skills/uipath-coded-apps/references/oauth-scopes.md +39 -4
- package/skills/uipath-coded-apps/references/pack-publish-deploy.md +37 -21
- package/skills/uipath-coded-apps/references/sdk/conversational-agent.md +2 -0
- package/skills/uipath-coded-apps/references/sdk/data-fabric.md +2 -0
- package/skills/uipath-coded-apps/references/sdk/orchestrator.md +2 -0
- package/skills/uipath-coded-apps/references/widgets/conversational-agent-chat.md +90 -0
- package/skills/uipath-coded-apps/references/widgets/datatable.md +97 -0
- package/skills/uipath-coded-apps/references/widgets/external-auth.md +97 -0
- package/skills/uipath-coded-apps/references/widgets/multi-file-upload.md +98 -0
- package/skills/uipath-coded-apps/references/widgets/pdf-viewer.md +122 -0
- package/skills/uipath-coded-apps/references/widgets/validation-station.md +1 -1
- package/skills/uipath-functions/SKILL.md +11 -0
- package/skills/uipath-insights/SKILL.md +52 -247
- package/skills/uipath-insights/references/filter-discovery-guide.md +106 -0
- package/skills/uipath-insights/references/investigation-playbook-guide.md +24 -16
- package/skills/uipath-insights/references/jobs-commands-guide.md +196 -53
- package/skills/uipath-ixp/SKILL.md +10 -4
- package/skills/uipath-ixp/references/cli-reference.md +59 -5
- package/skills/uipath-ixp/references/label-documents-guide.md +12 -5
- package/skills/uipath-maestro-bpmn/SKILL.md +27 -9
- package/skills/uipath-maestro-bpmn/references/diagnose/references/failure-modes.md +6 -3
- package/skills/uipath-maestro-bpmn/references/operate/CAPABILITY.md +1 -1
- package/skills/uipath-maestro-bpmn/references/operate/references/ship.md +9 -3
- package/skills/uipath-maestro-bpmn/references/registry-workflow.md +1 -1
- package/skills/uipath-maestro-bpmn/references/shared/local-metadata-regeneration-guide.md +18 -11
- package/skills/uipath-maestro-bpmn/references/structural-bpmn.md +13 -7
- package/skills/uipath-maestro-case/SKILL.md +138 -170
- package/skills/uipath-maestro-case/references/bindings-and-expressions.md +14 -1
- package/skills/uipath-maestro-case/references/bindings-v2-sync.md +25 -1
- package/skills/uipath-maestro-case/references/brownfield.md +7 -3
- package/skills/uipath-maestro-case/references/case-commands.md +63 -8
- package/skills/uipath-maestro-case/references/case-editing-operations.md +11 -8
- package/skills/uipath-maestro-case/references/case-schema.md +5 -3
- package/skills/uipath-maestro-case/references/case-spec-input-details.md +4 -0
- package/skills/uipath-maestro-case/references/connector-integration.md +3 -1
- package/skills/uipath-maestro-case/references/connector-trigger-impl.md +236 -0
- package/skills/uipath-maestro-case/references/connector-trigger-planning.md +300 -0
- package/skills/uipath-maestro-case/references/entry-points-sync.md +2 -0
- package/skills/uipath-maestro-case/references/evals/evals.json +33 -40
- package/skills/uipath-maestro-case/references/implementation.md +58 -13
- package/skills/uipath-maestro-case/references/phased-execution.md +87 -20
- package/skills/uipath-maestro-case/references/placeholder-tasks.md +3 -1
- package/skills/uipath-maestro-case/references/planning.md +26 -16
- package/skills/uipath-maestro-case/references/plugins/case/impl-json.md +2 -5
- package/skills/uipath-maestro-case/references/plugins/case/planning.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/conditions/case-exit-conditions/impl-json.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/conditions/case-exit-conditions/planning.md +5 -3
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/impl-json.md +4 -2
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/planning.md +6 -4
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/impl-json.md +6 -4
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/planning.md +6 -4
- package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/impl-json.md +42 -3
- package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/planning.md +6 -4
- package/skills/uipath-maestro-case/references/plugins/logging/impl-json.md +50 -32
- package/skills/uipath-maestro-case/references/plugins/sla/impl-json.md +2 -4
- package/skills/uipath-maestro-case/references/plugins/sla/planning.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/stages/impl-json.md +1 -4
- package/skills/uipath-maestro-case/references/plugins/stages/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/action/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/action/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/agent/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/agent/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/planning.md +5 -3
- package/skills/uipath-maestro-case/references/plugins/tasks/case-management/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/case-management/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/impl-json.md +43 -13
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/planning.md +4 -2
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/impl-json.md +10 -7
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/planning.md +5 -3
- package/skills/uipath-maestro-case/references/plugins/tasks/create-inline-common.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/tasks/process/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/process/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/rpa/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/rpa/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/triggers/event/impl-json.md +9 -6
- package/skills/uipath-maestro-case/references/plugins/triggers/event/planning.md +5 -3
- package/skills/uipath-maestro-case/references/plugins/triggers/manual/impl-json.md +1 -4
- package/skills/uipath-maestro-case/references/plugins/triggers/manual/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/triggers/timer/impl-json.md +1 -4
- package/skills/uipath-maestro-case/references/plugins/triggers/timer/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/variables/bindings/impl-json.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/variables/global-vars/impl-json.md +40 -2
- package/skills/uipath-maestro-case/references/plugins/variables/global-vars/planning.md +12 -2
- package/skills/uipath-maestro-case/references/plugins/variables/io-binding/impl-json.md +8 -6
- package/skills/uipath-maestro-case/references/plugins/variables/io-binding/planning.md +17 -3
- package/skills/uipath-maestro-case/references/registry-discovery.md +9 -5
- package/skills/uipath-maestro-case/references/sla-response-shapes.md +3 -1
- package/skills/uipath-maestro-case/references/troubleshooting-guide.md +2 -0
- package/skills/uipath-maestro-case/scripts/audit_plan.py +231 -0
- package/skills/uipath-maestro-flow/references/author/CAPABILITY.md +8 -4
- package/skills/uipath-maestro-flow/references/author/references/editing-operations-cli.md +5 -3
- package/skills/uipath-maestro-flow/references/author/references/editing-operations-json.md +14 -4
- package/skills/uipath-maestro-flow/references/author/references/editing-operations.md +3 -3
- package/skills/uipath-maestro-flow/references/author/references/greenfield.md +12 -3
- package/skills/uipath-maestro-flow/references/author/references/planning-arch.md +17 -13
- package/skills/uipath-maestro-flow/references/author/references/planning-impl.md +1 -1
- package/skills/uipath-maestro-flow/references/author/references/plugins/agent/impl.md +49 -4
- package/skills/uipath-maestro-flow/references/author/references/plugins/connector/impl.md +59 -17
- package/skills/uipath-maestro-flow/references/author/references/plugins/connector-trigger/impl.md +3 -3
- package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl-connector.md +3 -1
- package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl-manual.md +3 -1
- package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl.md +5 -2
- package/skills/uipath-maestro-flow/references/author/references/plugins/inline-agent/impl.md +31 -16
- package/skills/uipath-maestro-flow/references/author/references/plugins/ixp/impl.md +13 -4
- package/skills/uipath-maestro-flow/references/author/references/plugins/loop/impl.md +185 -25
- package/skills/uipath-maestro-flow/references/author/references/plugins/loop/planning.md +18 -10
- package/skills/uipath-maestro-flow/references/author/references/plugins/rpa/impl.md +9 -3
- package/skills/uipath-maestro-flow/references/author/references/plugins/terminate/impl.md +6 -3
- package/skills/uipath-maestro-flow/references/diagnose/references/failure-modes.md +68 -0
- package/skills/uipath-maestro-flow/references/shared/cli-commands.md +2 -1
- package/skills/uipath-maestro-flow/references/shared/file-format.md +36 -9
- package/skills/uipath-maestro-flow/references/shared/node-output-wiring.md +1 -1
- package/skills/uipath-maestro-flow/references/shared/ux-narration-and-todos.md +1 -1
- package/skills/uipath-maestro-flow/references/shared/variables-and-expressions.md +77 -20
- package/skills/uipath-planner/SKILL.md +30 -12
- package/skills/{uipath-maestro-case/assets/templates/sdd-template-examples.md → uipath-planner/assets/templates/case-sdd-examples.md} +18 -32
- package/skills/uipath-planner/assets/templates/case-sdd-template.md +289 -309
- package/skills/uipath-planner/references/case-design-lane-guide.md +288 -0
- package/skills/uipath-planner/references/multi-skill-patterns-guide.md +1 -1
- package/skills/uipath-planner/references/package-selection-guide.md +2 -2
- package/skills/uipath-planner/references/pdd-driven-lane-guide.md +5 -1
- package/skills/uipath-planner/references/product-selection-guide.md +2 -2
- package/skills/uipath-planner/references/sdd-generation-guide.md +16 -15
- package/skills/uipath-planner/scripts/audit_sdd.py +437 -0
- package/skills/uipath-platform/SKILL.md +7 -2
- package/skills/uipath-platform/references/data-fabric/choice-sets.md +1 -1
- package/skills/uipath-platform/references/data-fabric/data-fabric.md +1 -1
- package/skills/uipath-platform/references/data-fabric/entity-schema.md +37 -21
- package/skills/uipath-platform/references/data-fabric/file-attachments.md +1 -1
- package/skills/uipath-platform/references/guardrails/byo-configurations.md +205 -0
- package/skills/uipath-platform/references/traces/feedback.md +4 -2
- package/skills/uipath-platform/references/uip-commands.md +2 -2
- package/skills/uipath-review/SKILL.md +55 -52
- package/skills/uipath-review/references/agents/agent-grading-rubric.md +62 -40
- package/skills/uipath-review/references/agents/agents-coded-rules.md +7 -1
- package/skills/uipath-review/references/agents/agents-lowcode-rules.md +21 -2
- package/skills/uipath-review/references/agents/guardrails/coded-guardrails-review.md +78 -13
- package/skills/uipath-review/references/agents/guardrails/guardrails-review.md +11 -4
- package/skills/uipath-review/references/architecture-assessment-guide.md +1 -1
- package/skills/uipath-review/references/review-workflow-guide.md +19 -10
- package/skills/uipath-review/references/rule-catalog-workflow.md +6 -6
- package/skills/uipath-review/references/rule-format.md +1 -1
- package/skills/uipath-rpa/SKILL.md +1 -1
- package/skills/uipath-solution/SKILL.md +4 -4
- package/skills/uipath-solution/references/solution-overview.md +7 -2
- package/skills/uipath-tasks/SKILL.md +27 -1
- package/skills/uipath-tasks/references/task-catalogs.md +79 -0
- package/skills/uipath-tasks/references/task-data.md +45 -0
- package/skills/uipath-tasks/references/task-metadata.md +69 -0
- package/skills/uipath-test/SKILL.md +3 -3
- package/skills/uipath-test/references/test-result-report-guide.md +16 -1
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/ambiguous-selector.md +1 -1
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/scope-container-wrong-page.md +1 -1
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/verify-execution-failure.md +2 -2
- package/skills/uipath-troubleshoot/references/products/agents/playbooks/guardrail-violation.md +12 -0
- package/version-manifest.json +2 -2
- package/skills/uipath-maestro-case/assets/templates/sdd-template.md +0 -667
- package/skills/uipath-maestro-case/references/connector-trigger-common.md +0 -511
- package/skills/uipath-maestro-case/references/phase-0-interview.md +0 -279
- package/skills/uipath-maestro-case/references/sdd-generation-rules.md +0 -1026
- package/skills/uipath-review/references/agents/agent-common-issues.md +0 -401
- package/skills/uipath-review/references/agents/agent-review-checklist.md +0 -379
- /package/skills/{uipath-maestro-case → uipath-planner}/assets/templates/sdd-viewer.html +0 -0
package/skills/uipath-maestro-flow/references/author/references/plugins/inline-agent/impl.md
CHANGED
|
@@ -47,10 +47,14 @@ After editing `content`, rebuild the matching `messages[].contentTokens` (`type:
|
|
|
47
47
|
|
|
48
48
|
## Wiring Flow Variables into Agent Prompts
|
|
49
49
|
|
|
50
|
-
Passing flow data into an inline agent requires **three hand-authored, aligned** pieces. **The CLI does not derive the input wiring** — `uip agent refresh` does **not** scan prompts, derive `inputSchema`, or populate `agentInputVariables`; you author all three, and packaging ships them as-authored. (Refresh *does* regenerate `messages[].contentTokens` from `content` — that's the one derived part; see the invariant below.) The converter builds the runtime `JobArguments` from the **flow node's `inputs.agentInputVariables[]`** (not from `$vars` tokens in `agent.json`). Flatten rule: `$vars.<trigger>.output.<var>` → `<trigger>__output__<var>`.
|
|
50
|
+
Passing flow data into an inline agent requires **three hand-authored, aligned** pieces. **The CLI does not derive the input wiring** — `uip agent refresh` does **not** scan prompts, derive `inputSchema`, or populate `agentInputVariables`; you author all three, and packaging ships them as-authored. (Refresh *does* regenerate `messages[].contentTokens` from `content` — that's the one derived part; see the invariant below.) The converter builds the runtime `JobArguments` from the **flow node's `inputs.agentInputVariables[]`** (not from `$vars` tokens in `agent.json`). Any `inputs.systemPrompt` / `inputs.userPrompt` string on the node makes the converter drop every `agentInputVariables[]` entry the prompt text does not reference (`@uipath/flow-converter`; prune present 0.25.1 through 0.42.0). Flatten rule: `$vars.<trigger>.output.<var>` → `<trigger>__output__<var>`.
|
|
51
|
+
|
|
52
|
+
Self-check the CLI you run: `uip maestro flow validate` must pass a prompt-less node and must fail empty-string prompts. Never add stub prompts. If validate rejects the absent keys, see § Refresh and Validate § Older CLI.
|
|
51
53
|
|
|
52
54
|
The three pieces — **Delivery** (node `agentInputVariables[]`), **Contract** (`agent.json` `inputSchema`), and **Resolution** (`{{input.<key>}}` in `messages[].content`) — and their examples are in the table below. `flow validate` catches a Resolution↔Contract mismatch (a `{{input.K}}` that's malformed or names a key not in `inputSchema`), but a missing/wrong **Delivery** binding passes validate and only shows up as empty input at `flow debug`. Agent-side `inputSchema`/`contentTokens` mechanics: the `uipath-agents` skill's [inline-in-flow § Wiring Flow Inputs Into an Inline Agent](../../../../../../uipath-agents/references/lowcode/capabilities/inline-in-flow/inline-in-flow.md#wiring-flow-inputs-into-an-inline-agent-required).
|
|
53
55
|
|
|
56
|
+
- **A flow pulled from Studio Web carries node prompts mirrored from `agent.json`.** The canvas writes node `inputs` into `agent.json.messages[]` on save and back on load. Those mirrored prompts are safe only if they reference every `agentInputVariables[]` key. Otherwise run `uip agent refresh --inline-in-flow` — shell-ify strips node prompts and keeps structural inputs.
|
|
57
|
+
|
|
54
58
|
> **Prerequisite — the bound value must actually exist as a variable.** A node binding `=$vars.X` resolves at runtime only if `$vars.X` is a declared variable. `flow validate` does **not** check that the path exists — a binding referencing an undeclared trigger field passes validate, then **faults at debug** with `JobArguments` empty. When the upstream node is a **trigger** (e.g. `core.trigger.manual`, id `start`), each field you bind must be declared in `variables.globals[]` as a trigger-associated input — `direction: "in"`, `triggerNodeId: "<triggerId>"` — and is then read as `$vars.<triggerId>.output.<id>`:
|
|
55
59
|
>
|
|
56
60
|
> ```json
|
|
@@ -115,7 +119,7 @@ Matching `agent.json` — `inputSchema` keys mirror the bindings; the prompt use
|
|
|
115
119
|
]
|
|
116
120
|
```
|
|
117
121
|
|
|
118
|
-
|
|
122
|
+
**Write no prompt keys on the flow node.** Omit `inputs.systemPrompt` and `inputs.userPrompt` — full rule in § Anti-patterns below. The canonical prompt lives in `agent.json messages[]`, and it must be a real structured one (see `autonomous-agent-prompting-guide.md`), not a bare blob.
|
|
119
123
|
|
|
120
124
|
### When the source field name is unknown at authoring time
|
|
121
125
|
|
|
@@ -125,7 +129,7 @@ Connector-trigger output fields (e.g. email `subject`/`from`/`body`) aren't in t
|
|
|
125
129
|
|
|
126
130
|
- **In `agent.json` prompts, use the `{{input.<trigger>__output__<var>}}` form** (the flattened key, `input.` prefix). Never use raw `{{ $vars.X }}` (the runtime can't resolve it — agent gets the literal token) or `{{plainName}}` (no prefix).
|
|
127
131
|
- **The `variable` `rawString` is exactly what sits between the braces** — `input.<trigger>__output__<var>`, brace-free, no added spaces.
|
|
128
|
-
- **
|
|
132
|
+
- **Never write `inputs.systemPrompt` / `inputs.userPrompt` on the flow node.** Delete the keys — do not empty them. A prompt string on the node makes the converter drop every `agentInputVariables[]` entry that text does not reference (`@uipath/flow-converter`; prune present 0.25.1 through 0.42.0). `JobArguments` then ships as `{"input":""}` and the agent job faults. Empty strings fail `flow validate`. The canonical prompt lives in `agent.json messages[]`; delivery comes from `agentInputVariables[]`.
|
|
129
133
|
- **Declared `type` must match the bound node's real output shape, in BOTH `agentInputVariables[].type` and `inputSchema`.** The runtime strict-validates `JobArguments` before the model runs: a list bound to an `object`-typed key faults `AGENT_STARTUP.INPUT_VALIDATION_ERROR` (incident `170002`, `"Input should be a valid dictionary … input_type=list"`), and both `flow validate` and `agent validate` still report `Valid`. **Data Service query-entity-records returns an array. A script-built value has the shape the script returns — `.map()` returns array, never object.** The registry won't settle it — connector nodes declare `output.type: "object"` with no schema — so bind the leaf (`=$vars.crmLookup1.output[0].accountTier`) or read the shape from one `flow debug` run.
|
|
130
134
|
- **Mark a key `required` only when the binding can never be empty** — otherwise an empty upstream fails the same startup validation instead of letting the agent reason about a missing value.
|
|
131
135
|
- **Each `agentInputVariables[]` entry uses `binding` (not `value`).** The converter builds `JobArguments` from `binding`; a `value: "=js:$vars…"` entry (Studio Web's internal canvas form) is **ignored** — the agent gets empty input and faults at debug (`AGENT_RUNTIME.TERMINATION_LLM_RAISED_ERROR`, "Template placeholders detected instead of actual values"). Write `{ "id": "<key>", "binding": "=$vars.<trigger>.output.<var>" }`. `binding` is what both the CLI converter and Studio Web's loader read.
|
|
@@ -162,8 +166,6 @@ Use `Edit` to add a node instance to `nodes[]`. The instance carries only per-in
|
|
|
162
166
|
"typeVersion": "1.0",
|
|
163
167
|
"display": { "label": "Autonomous Agent" },
|
|
164
168
|
"inputs": {
|
|
165
|
-
"systemPrompt": "You are an agentic assistant.",
|
|
166
|
-
"userPrompt": "What is the current date?",
|
|
167
169
|
"source": "<projectId-uuid>",
|
|
168
170
|
"agentInputVariables": [],
|
|
169
171
|
"agentOutputVariables": [
|
|
@@ -181,6 +183,8 @@ Use `Edit` to add a node instance to `nodes[]`. The instance carries only per-in
|
|
|
181
183
|
}
|
|
182
184
|
```
|
|
183
185
|
|
|
186
|
+
No `inputs.systemPrompt` / `inputs.userPrompt` keys. Self-check the CLI you run: `uip maestro flow validate` must pass a prompt-less node and must fail empty-string prompts. Never add stub prompts. If validate rejects the absent keys, see § Refresh and Validate § Older CLI.
|
|
187
|
+
|
|
184
188
|
Also add:
|
|
185
189
|
|
|
186
190
|
- A `definitions[]` entry copied verbatim from `uip maestro flow registry get uipath.agent.autonomous --output json` (`Data.Node` or the top-level node object, depending on CLI/plugin version). Set `typeVersion` to the copied definition's exact `version`.
|
|
@@ -330,8 +334,6 @@ The instance carries only per-instance data (`inputs`, `outputs`, `display`). BP
|
|
|
330
334
|
"typeVersion": "1.0",
|
|
331
335
|
"display": { "label": "Autonomous Agent" },
|
|
332
336
|
"inputs": {
|
|
333
|
-
"systemPrompt": "You are an agentic assistant.",
|
|
334
|
-
"userPrompt": "What is the current date?",
|
|
335
337
|
"source": "<projectId-uuid>",
|
|
336
338
|
"agentInputVariables": [],
|
|
337
339
|
"agentOutputVariables": [
|
|
@@ -349,10 +351,12 @@ The instance carries only per-instance data (`inputs`, `outputs`, `display`). BP
|
|
|
349
351
|
}
|
|
350
352
|
```
|
|
351
353
|
|
|
354
|
+
No `inputs.systemPrompt` / `inputs.userPrompt` keys. Self-check the CLI you run: `uip maestro flow validate` must pass a prompt-less node and must fail empty-string prompts. Never add stub prompts. If validate rejects the absent keys, see § Refresh and Validate § Older CLI.
|
|
355
|
+
|
|
352
356
|
Notes:
|
|
353
357
|
|
|
354
358
|
- `inputs.source` — the inline agent's `projectId`; must match the subdirectory name and `agent.json.projectId`. The definition still declares `model.source: true`, but flow-core hoists that identity field onto `inputs.source` for the node instance.
|
|
355
|
-
- `inputs.systemPrompt` / `inputs.userPrompt`
|
|
359
|
+
- **No `inputs.systemPrompt` / `inputs.userPrompt` on the instance.** Omit both keys — full rule in § Wiring Flow Variables into Agent Prompts § Anti-patterns. Canonical inline-agent prompts live in `agent.json`.
|
|
356
360
|
- `inputs.agentInputVariables` carries one entry per flow input the agent reads — `{ id: "<trigger>__output__<var>", binding: "=$vars.<trigger>.output.<var>" }`. This is the only thing the converter turns into the runtime `JobArguments`; prompts then reference each input as `{{input.<trigger>__output__<var>}}` (see § Wiring Flow Variables into Agent Prompts above). Leave it `[]` only when the agent reads no flow data.
|
|
357
361
|
- **No `model` block on the inline-agent node instance.** The node inherits serviceType/version/context from `definitions[]`; `source` lives at `inputs.source`. Stale instance fields such as `model.serviceType`, `model.version`, or `model.context` override the inherited definition and can cause runtime mismatch.
|
|
358
362
|
|
|
@@ -399,17 +403,28 @@ uip agent validate "<FlowProjectDir>/<projectId>" --inline-in-flow --output json
|
|
|
399
403
|
uip maestro flow validate <FlowName>.flow --output json
|
|
400
404
|
```
|
|
401
405
|
|
|
402
|
-
>
|
|
406
|
+
> **Validator behavior — verified, not guaranteed.** `uip maestro flow validate` accepts a `uipath.agent.autonomous` node that carries **no** `inputs.systemPrompt` / `inputs.userPrompt` keys (verified 2026-08). It rejects **empty-string** prompts. The message varies by CLI build: `[SCHEMA_ERROR] System prompt is required` (current) or `[REQUIRED_FIELD] "systemPrompt" is required`. So delete the keys; never set them to `""`. The registry `inputDefinition` marks both fields `required` (`minLength: 1`), so acceptance of absent keys is a validator gap, not a guarantee. Re-run the self-check after each CLI upgrade: a prompt-less node must pass, empty-string prompts must fail. Older CLIs rejected absent keys and needed non-empty placeholders — see § Older CLI below. Canonical prompts stay in the inline agent's `agent.json`.
|
|
407
|
+
|
|
408
|
+
> **Refresh also shell-ifies the parent `.flow` (self-contained flows).** When a flow was authored self-contained in Studio Web, its `.flow` embeds the inline agent's prompts/model/guardrails and each resource node's config **inline** (not just in the `<projectId>/` sidecar). Since you edit the **sidecar**, that stale embed would shadow your edits when the flow is re-opened in Studio Web (the embed wins over the sidecar on load). So `uip agent refresh --inline-in-flow` strips this agent's embedded config back out of the parent `.flow` — leaving only structural inputs (`source`, `agentInputVariables`, etc.) on the agent node and `{source, detail, itemsDescription}` on its resource nodes — so Studio Web re-hydrates the cluster from your freshly-written sidecar on import. It is **scoped to the agent being refreshed** (siblings untouched), a **no-op** for flows authored from scratch via the CLI (already shells), and **best-effort** (a failure never fails refresh). When it acts, the JSON output carries `FlowShellified: true` and `FlowResourceNodesStripped: <n>`. You author the sidecar (`agent.json` + `resources/`); refresh keeps the `.flow` a shell — do not hand-embed prompts/config back into the flow node.
|
|
409
|
+
|
|
410
|
+
### Older CLI — validate rejects absent prompt keys
|
|
411
|
+
|
|
412
|
+
Some environments pin a CLI whose validator still rejects absent prompt keys with `[REQUIRED_FIELD] "systemPrompt" is required`. Upgrade the CLI first. When the environment blocks an upgrade:
|
|
413
|
+
|
|
414
|
+
1. Add minimal placeholder `inputs.systemPrompt` / `inputs.userPrompt` strings — **only** after validate rejects the absent keys. Never use `""`; empty strings fail the same check.
|
|
415
|
+
2. Run `uip maestro flow debug` and read the trace. `JobArguments` must carry your bound inputs, not `{"input":""}`.
|
|
416
|
+
3. If `JobArguments` is `{"input":""}`, that CLI also carries the converter prune (`@uipath/flow-converter` 0.25.1+): the placeholder text references no input, so the converter drops every `agentInputVariables[]` entry. No node edit fixes this — the placeholders satisfy the old validator and break the wiring at the same time. Escalate for a CLI upgrade; do not ship a workaround.
|
|
403
417
|
|
|
404
418
|
## Debug
|
|
405
419
|
|
|
406
420
|
| Error | Cause | Fix |
|
|
407
421
|
| --- | --- | --- |
|
|
408
|
-
| `flow validate` reports `systemPrompt` / `userPrompt` required | The
|
|
422
|
+
| `flow validate` reports `[SCHEMA_ERROR] System prompt is required` or `[REQUIRED_FIELD] systemPrompt` / `userPrompt` required | The node carries **empty-string** prompt keys, the `inputs.source` UUID is missing, or the inline agent subdirectory cannot be found | Delete `inputs.systemPrompt` / `inputs.userPrompt` (delete the keys — `""` fails), or run `uip agent refresh "<FlowProjectDir>/<projectId>" --inline-in-flow --output json` to strip them. Set `inputs.source` to the inline agent UUID, and verify `<FlowDir>/<projectId>/agent.json` exists |
|
|
423
|
+
| Debug faults with `JobArguments {"input":""}` — `AGENT_STARTUP.INPUT_VALIDATION_ERROR` `"Field required"` per `inputSchema` key (incident `170002` family); **expected, not yet observed:** `AGENT_RUNTIME.TERMINATION_LLM_RAISED_ERROR` when the schema marks nothing required | Prompt keys on the agent node — the converter drops every `agentInputVariables[]` entry the node prompt text does not reference. Stub text references nothing, so every entry goes. Discriminator: the entries already use `binding:` | Delete `inputs.systemPrompt` and `inputs.userPrompt` from the node — delete the keys, because empty strings fail `flow validate`. Or run `uip agent refresh "<FlowProjectDir>/<projectId>" --inline-in-flow --output json` — shell-ify strips node prompts. Verify: the agent node instance must contain no `systemPrompt` key. See § Wiring Flow Variables into Agent Prompts |
|
|
409
424
|
| `inputs.source` UUID does not match any subdirectory | Wrong source value, or folder renamed | Set `inputs.source` to the exact UUID of the inline agent directory |
|
|
410
425
|
| Flow runs a different agent than expected | `inputs.source` points to a stale/leftover inline agent dir | Check subdirectory names — only one inline agent dir should correspond to each agent node |
|
|
411
426
|
| `Orchestrator.StartAgentJob` error at runtime | Stale instance `model` fields override the inherited inline-agent definition | Remove the inline-agent node's instance `model` block and keep the registry definition's `model.serviceType: "Orchestrator.StartInlineAgentJob"` in `definitions[]` |
|
|
412
|
-
| Studio Web reports "System prompt is required" | Inline agent's `agent.json.messages[]` has empty `content`, OR derived files (`entry-points.json`, `bindings_v2.json`) are stale | Set prompts in `agent.json`, re-run `uip agent refresh --inline-in-flow` to regenerate derived files, then `uip agent validate --inline-in-flow` to check — see `uipath-agents` skill |
|
|
427
|
+
| Studio Web reports "System prompt is required" | Inline agent's `agent.json.messages[]` has empty `content`, OR derived files (`entry-points.json`, `bindings_v2.json`) are stale, OR the node carries no `inputs.systemPrompt` and Studio Web's node form validates the field | Set prompts in `agent.json`, re-run `uip agent refresh --inline-in-flow` to regenerate derived files, then `uip agent validate --inline-in-flow` to check — see `uipath-agents` skill. For the third cause: keep the keys off, set real prompts in `agent.json`, re-run `uip agent refresh --inline-in-flow`, and re-import so the canvas hydrates the form from the sidecar |
|
|
413
428
|
| Studio Web debug: "Could not find process for tool" | Flow project's `bindings_v2.json` is missing the tool's process binding, so `uip solution resources refresh` never created the solution-level resource | Re-run `uip agent refresh --inline-in-flow --bindings-target <FlowProjectDir>/bindings_v2.json` to propagate bindings, then `uip agent validate --inline-in-flow` to check schema, then `uip solution resources refresh`, then re-upload |
|
|
414
429
|
| `bindings_v2.json` is empty or missing tool bindings | Tool bindings were not propagated to the flow project level, or a later tool overwrote the file | Re-run `uip agent refresh --inline-in-flow --bindings-target <FlowProjectDir>/bindings_v2.json` after all flow node and edge edits are complete. Refresh is the verb that writes the file — do not hand-edit it |
|
|
415
430
|
| Agent tool (process / agent / api / processOrchestration) cannot resolve at runtime | Missing top-level `bindings[]` entries, mismatched tool-node `inputs.source` / `resource.json` id, stale solution resources, or missing project-level `bindings_v2.json` | Add the resource bindings from the tool definition, keep the tool node's `inputs.source` equal to the resource UUID, run `uip agent refresh --inline-in-flow --bindings-target <FlowProjectDir>/bindings_v2.json` to write bindings, then `uip agent validate --inline-in-flow` to check, then run `uip solution resources refresh` |
|
|
@@ -422,8 +437,8 @@ uip maestro flow validate <FlowName>.flow --output json
|
|
|
422
437
|
| `agent validate` flags `Expected "input.X" but got "{{input.X}}"` | Hand-edited `variable` token has the braces/extra spaces in its `rawString` | Re-run `uip agent refresh` to regenerate the tokens from `content` (brace-free `rawString`) — don't hand-fix it. See § The `content` ↔ `contentTokens` mirror invariant. |
|
|
423
438
|
| `agent validate` flags `contentTokens has N entries but content requires M. Rebuild contentTokens to match content.` | `content` and `contentTokens` drifted (e.g. tokens edited without `content`, or vice versa) | Re-run `uip agent refresh` to regenerate `contentTokens` from `content`. If the prompt itself is wrong, fix `content` first, then refresh. See § The `content` ↔ `contentTokens` mirror invariant. |
|
|
424
439
|
| Prompt shows literal `{{input.X}}` at runtime | `inputSchema.properties` missing the referenced key (`flow validate` flags this — run it) | Add the `<trigger>__output__<var>` key to `inputSchema`. |
|
|
425
|
-
| `flow validate` passes but debug faults `AGENT_RUNTIME.TERMINATION_LLM_RAISED_ERROR` (literal `input.<key>`) | Node `agentInputVariables` uses `value:` instead of `binding:` (or is missing) → empty `JobArguments` | Set `binding:"=$vars.<trigger>.output.<var>"` on the node entry; ensure the trigger global is declared (`direction:"in"`). |
|
|
426
|
-
| Debug faults `AGENT_RUNTIME.TERMINATION_LLM_RAISED_ERROR` "Template placeholders detected instead of actual values" — and the node *does* have `agentInputVariables[]` | Entries use `value: "=js:$vars…"` (Studio Web's canvas form) instead of `binding`; the converter only reads `binding`, so `JobArguments` are empty | Rename `value` → `binding` on each entry and strip the `=js:` prefix: `{ "id": "<key>", "binding": "=$vars.<trigger>.output.<var>" }`. See § Wiring Flow Variables into Agent Prompts. |
|
|
440
|
+
| `flow validate` passes but debug faults `AGENT_RUNTIME.TERMINATION_LLM_RAISED_ERROR` (literal `input.<key>`) | Node `agentInputVariables` uses `value:` instead of `binding:` (or is missing) → empty `JobArguments` | Set `binding:"=$vars.<trigger>.output.<var>"` on the node entry; ensure the trigger global is declared (`direction:"in"`). If `binding:` is already correct, check for prompt keys on the node — see the prune row. |
|
|
441
|
+
| Debug faults `AGENT_RUNTIME.TERMINATION_LLM_RAISED_ERROR` "Template placeholders detected instead of actual values" — and the node *does* have `agentInputVariables[]` | Entries use `value: "=js:$vars…"` (Studio Web's canvas form) instead of `binding`; the converter only reads `binding`, so `JobArguments` are empty | Rename `value` → `binding` on each entry and strip the `=js:` prefix: `{ "id": "<key>", "binding": "=$vars.<trigger>.output.<var>" }`. If `binding:` is already correct, check for prompt keys on the node — see the prune row. See § Wiring Flow Variables into Agent Prompts. |
|
|
427
442
|
|
|
428
443
|
## Repair Recipes
|
|
429
444
|
|
|
@@ -459,7 +474,7 @@ Same pattern works for any node type — substitute the `nodeType` string in bot
|
|
|
459
474
|
|
|
460
475
|
### Resolve a `[REQUIRED_FIELD] systemPrompt is required` validator error
|
|
461
476
|
|
|
462
|
-
Current
|
|
477
|
+
Current CLIs report the same fault as `[SCHEMA_ERROR] System prompt is required`. Two causes. (a) Empty-string prompt keys on the node. (b) The validator's hydration through `inputs.source` short-circuited — missing UUID, missing subdirectory, or empty `agent.json` messages. Absent prompt keys pass on a current CLI; if they do not, see § Refresh and Validate § Older CLI. Check in order:
|
|
463
478
|
|
|
464
479
|
1. **UUID at `inputs.source`** — the `projectId` UUID must be set at `inputs.source`. Diagnose:
|
|
465
480
|
|
|
@@ -497,12 +512,12 @@ Current flow validation requires non-empty placeholder prompts on the flow node
|
|
|
497
512
|
|
|
498
513
|
3. **Prompts in `agent.json`** — set `messages[0].content` (system) and `messages[1].content` (user) to real prompts before validate. Rebuild `messages[].contentTokens` to match — `[{ "type": "simpleText", "rawString": "<your prompt text>" }]` per message.
|
|
499
514
|
|
|
500
|
-
4. **
|
|
515
|
+
4. **Prompt keys on the flow node** — delete `inputs.systemPrompt` and `inputs.userPrompt` if present. Deleting the keys passes validate; `""` does not. Or run `uip agent refresh "<FlowProjectDir>/<projectId>" --inline-in-flow --output json` — shell-ify strips node prompts. Verify: the agent node instance must contain no `systemPrompt` key. Keep the canonical prompt text in `agent.json`.
|
|
501
516
|
|
|
502
517
|
## What NOT to Do
|
|
503
518
|
|
|
504
519
|
- **Do not use Flow CLI `node add`, `edge add`, or `variable` commands for inline-agent graph edits** — inline-agent node, edge, variable, layout, and tool-resource node changes are non-carve-out structural `.flow` mutations and must be authored directly with `Edit` / `Write`.
|
|
505
|
-
- **Do not
|
|
520
|
+
- **Do not write `inputs.systemPrompt` / `inputs.userPrompt` on the inline-agent node** — full rule in § Wiring Flow Variables into Agent Prompts § Anti-patterns. Prompts live in `agent.json`.
|
|
506
521
|
- **Do not put a `model` block on the inline-agent node instance** — the node inherits serviceType/version/context from `definitions[]`; the inline-agent source lives at `inputs.source`.
|
|
507
522
|
- **Do not use `model.agentProjectId`, `inputs.agentProjectId`, or `model.source` on any inline-agent-related node instance** — both `uipath.agent.autonomous` and every attached resource node (`uipath.agent.resource.tool.*`, `uipath.agent.resource.escalation`, `uipath.agent.resource.context.*`) carry source identity at `inputs.source` and have no instance `model` block.
|
|
508
523
|
- **Do not create `entry-points.json` or `project.uiproj` inside the inline agent directory** — those belong only to standalone agent projects.
|
|
@@ -108,6 +108,8 @@ Confirm:
|
|
|
108
108
|
|
|
109
109
|
For step-by-step add, delete, and wiring procedures, see [editing-operations.md](../../editing-operations.md). Use the JSON structure below for the node-specific `inputs` and `outputs` fields. Author CAPABILITY rule #15 (no top-level `model` block on the instance) and rule #14 (`variables.nodes[]` entry for every data-producing node) both apply. One IxP-specific difference: general action-node guidance treats the instance `outputs` block as optional, but on `uipath.ixp.*` it is required — see [Authoring rule #4](#authoring-rules).
|
|
110
110
|
|
|
111
|
+
If you can't fully configure the node this turn (greenfield exploration, upstream not wired, planning-only, unconfirmed model), you must STILL land it rather than drop the extraction step — see [Landing the node when you cannot fully configure it](#landing-the-node-when-you-cannot-fully-configure-it).
|
|
112
|
+
|
|
111
113
|
## JSON Structure
|
|
112
114
|
|
|
113
115
|
The IxP node instance carries `inputs` and `outputs` — and **no top-level `model` block**. The slim manifest `model` (`{ type, serviceType }`) lives only in `definitions[]`; the runtime `model.context` / `model.version` / `model.inputs` / `model.outputs` envelope is injected by the BPMN serializer at compile time.
|
|
@@ -299,10 +301,10 @@ Studio Web's variable picker renders `output.ExtractionResult` as opaque and doe
|
|
|
299
301
|
The `FieldName` values present in `ResultsDocument.Fields[]` depend on the trained IxP model's taxonomy and are NOT exposed through `uip maestro flow registry get` (the registry's `outputDefinition.output.schema` describes the wrapper envelope shape, not the per-model trained fields). Get them from the deployment:
|
|
300
302
|
|
|
301
303
|
```bash
|
|
302
|
-
uip ixp deployments get-taxonomy
|
|
304
|
+
uip ixp deployments get-taxonomy "<project-name>" --version <N> --output json
|
|
303
305
|
```
|
|
304
306
|
|
|
305
|
-
|
|
307
|
+
The positional is a project name from `uip ixp projects list`, and `--version` is required — get it from `uip ixp projects list-models "<project-name>"`. `Data.Node.inputDefaults.modelName` is frequently NOT a project name; passing it returns 404 `ProjectNotFoundError`, which is an ordinary outcome, not a problem to debug. Requires `uip login`; the command uses the user Bearer to call the same DU-App route that Studio Web's "Schema definition" panel uses.
|
|
306
308
|
|
|
307
309
|
Response shape:
|
|
308
310
|
|
|
@@ -333,10 +335,17 @@ Agent call sequence:
|
|
|
333
335
|
|
|
334
336
|
1. `uip maestro flow registry search "uipath.ixp" --output json` — list IxP nodes.
|
|
335
337
|
2. `uip maestro flow registry get "<node-type>" --output json` — read `Data.Node.inputDefaults.{folderKey, modelName}` (already done as part of [Build procedure](#build-procedure--copy-from-registry-get-do-not-construct-from-memory)).
|
|
336
|
-
3. `uip ixp deployments get-taxonomy
|
|
338
|
+
3. `uip ixp deployments get-taxonomy "<project-name>" --version <N> --output json` — read `documentTaxonomy.documentTypes[].fields[].fieldName`.
|
|
337
339
|
4. Author downstream consumers with `$vars.<id>.output.ExtractionResult.ResultsDocument.Fields.find(f => f.FieldName === '<fieldName from step 3>')?.Values?.[0]`.
|
|
338
340
|
|
|
339
|
-
If the command fails (login expired, deployment not yet published, transient failure), fall back to defensive `find`-by-`FieldName` patterns with assumed field names and surface the assumptions to the user under **Open Questions**. Do NOT substitute a one-off extraction or IxP-product-UI inspection in the agent loop — `get-taxonomy` is the agent-loop path.
|
|
341
|
+
If the command fails (no matching project, login expired, deployment not yet published, transient failure), fall back to defensive `find`-by-`FieldName` patterns with assumed field names and surface the assumptions to the user under **Open Questions**. **One attempt** — a 404 or validation error will not resolve by reissuing the lookup under another spelling of the name, so do not iterate on name variants. Do NOT substitute a one-off extraction or IxP-product-UI inspection in the agent loop — `get-taxonomy` is the agent-loop path.
|
|
342
|
+
|
|
343
|
+
## Landing the node when you cannot fully configure it
|
|
344
|
+
|
|
345
|
+
**The extraction step must ALWAYS land a node — never drop it because configuration is incomplete.** A greenfield/exploration turn, an unwired upstream, a "you don't need a working flow" instruction, or an unconfirmed model are NOT reasons to skip it. The common failure is landing the steps around extraction while the extraction node itself goes missing. Author it before the trigger and connector nodes — connector configuration branches open-endedly, and this is the node the request is about.
|
|
346
|
+
|
|
347
|
+
- **Model published** (`registry search "uipath.ixp"` returns entries) → land the real `uipath.ixp.*` node. When you can't finish configuring it this turn, still build the instance from `registry get` (copy `inputs.model` and the fixed `outputs` literal — no user input needed), set `inputs.fileRef` to a placeholder expression, and defer the model choice, `fileRef` source, and taxonomy to **Open Questions**. Do NOT downgrade to `core.logic.mock` — a published model exists, so land the real node.
|
|
348
|
+
- **No model published** (`Data: []`) → land a `core.logic.mock` placeholder per [If the Model Does Not Exist Yet](#if-the-model-does-not-exist-yet).
|
|
340
349
|
|
|
341
350
|
## If the Model Does Not Exist Yet
|
|
342
351
|
|
|
@@ -10,7 +10,20 @@
|
|
|
10
10
|
uip maestro flow registry get core.logic.loop --output json
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Confirm
|
|
13
|
+
Confirm the handles, required input `collection`, and the `outputDefinition` keys. Set the node instance `typeVersion` to the `version` field from this response — do not hardcode it.
|
|
14
|
+
|
|
15
|
+
The loop is a **container** node, so its handles split across two boundaries:
|
|
16
|
+
|
|
17
|
+
| Boundary | Handle | Direction | Purpose |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| outer | `input` | target | Entry from upstream |
|
|
20
|
+
| outer | `success` | source | Exit after all iterations complete |
|
|
21
|
+
| outer | `error` | source | Error path (when `errorHandlingEnabled`) |
|
|
22
|
+
| inner | `start` | source | Into the loop body (first body node) |
|
|
23
|
+
| inner | `continue` | target | Return from last body node |
|
|
24
|
+
| inner | `break` | target | Early exit (when `breakEnabled`) |
|
|
25
|
+
|
|
26
|
+
> There is no `output` port and no `loopBack` port. `output` is an output **variable** (`$vars.<loopId>.output`), not a handle. Wiring either name is a hard `flow validate` error — `Edge references undeclared source handle "output" on node "<loopId>" … rewire to one of: success, error, start`.
|
|
14
27
|
|
|
15
28
|
## JSON Structure
|
|
16
29
|
|
|
@@ -29,6 +42,8 @@ Confirm: input ports `input` and `loopBack`, output ports `success` and `output`
|
|
|
29
42
|
}
|
|
30
43
|
```
|
|
31
44
|
|
|
45
|
+
> **Collection source shape depends on the node type.** Connector `list` activities return the bare array — `"collection": "=js:$vars.searchIssuesByJql1.output"`, NOT `.output.issues` / `.output.items`. HTTP nodes differ — envelope preserved: `.output.body.<key>` as above. See [connector/impl.md — Connector output shape](../connector/impl.md).
|
|
46
|
+
|
|
32
47
|
Set `"parallel": true` to execute all iterations concurrently.
|
|
33
48
|
|
|
34
49
|
### Loop body nodes — `parentId` required
|
|
@@ -54,14 +69,27 @@ Every node inside the loop body **must** have `"parentId"` set to the loop node'
|
|
|
54
69
|
|
|
55
70
|
For step-by-step add, delete, and wiring procedures, see [editing-operations.md](../../editing-operations.md). Use the JSON structure above for the node-specific `inputs` and `parentId`.
|
|
56
71
|
|
|
72
|
+
### CLI carve-out nodes inside a loop
|
|
73
|
+
|
|
74
|
+
When adding a CLI carve-out node (connector, connector trigger, or managed HTTP) inside a loop, pass `--parent` to set `parentId` automatically:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
uip maestro flow node add <FLOW_PATH> core.action.http.v2 --label "Fetch data" --parent <LOOP_ID> --output json
|
|
78
|
+
uip maestro flow node add <FLOW_PATH> <CONNECTOR_NODE_TYPE> --label "Get record" --parent <LOOP_ID> --output json
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`--parent` validates the parent node exists and sets `parentId` on the new node. For non-carve-out node types (script, end, etc.), set `"parentId"` directly in the JSON — see the examples above.
|
|
82
|
+
|
|
57
83
|
## Wiring
|
|
58
84
|
|
|
59
|
-
Loop nodes have a specific wiring pattern:
|
|
85
|
+
Loop nodes have a specific wiring pattern — four edges:
|
|
60
86
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
87
|
+
| Edge | Source | Source port | Target | Target port |
|
|
88
|
+
| --- | --- | --- | --- | --- |
|
|
89
|
+
| Enter the loop | upstream node | that node's own output port (`output` on a manual trigger, `success` on an action node) | `<loopId>` | `input` |
|
|
90
|
+
| Into the body | `<loopId>` | `start` | first body node | `input` |
|
|
91
|
+
| Back from the body | last body node | `success` | `<loopId>` | `continue` |
|
|
92
|
+
| Exit the loop | `<loopId>` | `success` | downstream node | `input` |
|
|
65
93
|
|
|
66
94
|
See [editing-operations.md](../../editing-operations.md) for edge add procedures.
|
|
67
95
|
|
|
@@ -72,18 +100,20 @@ Inside the loop body, access the current item via `$vars.<loopId>.currentItem`:
|
|
|
72
100
|
```javascript
|
|
73
101
|
// In a Script node inside the loop body (parentId must be set to the loop node)
|
|
74
102
|
const item = $vars.loop1.currentItem;
|
|
75
|
-
const
|
|
76
|
-
return { processed: item.name.toUpperCase(), position:
|
|
103
|
+
const iteration = $vars.loop1.currentIteration;
|
|
104
|
+
return { processed: item.name.toUpperCase(), position: iteration };
|
|
77
105
|
```
|
|
78
106
|
|
|
79
107
|
| Variable | Description |
|
|
80
108
|
| --- | --- |
|
|
81
109
|
| `$vars.<loopId>.currentItem` | The item being processed in this iteration |
|
|
82
|
-
| `$vars.<loopId>.
|
|
110
|
+
| `$vars.<loopId>.currentIteration` | 1-based iteration number |
|
|
83
111
|
| `$vars.<loopId>.collection` | The full collection being iterated |
|
|
84
112
|
|
|
85
113
|
> **Do not use `iterator.currentItem`.** The correct access pattern is `$vars.<loopId>.currentItem` where `<loopId>` is the loop node's `id` (e.g., `$vars.loop1.currentItem`).
|
|
86
114
|
|
|
115
|
+
> **There is no `currentIndex`.** The registry's `outputDefinition` for `core.logic.loop` exposes `currentIteration`, and it starts at 1 — not 0. Nothing rejects the wrong name: a `variables.nodes` entry bound to `outputId: "currentIndex"` passes `flow validate`, because bindings are not checked against the node's declared outputs. Confirm the output names with `uip maestro flow registry get core.logic.loop --output json`.
|
|
116
|
+
|
|
87
117
|
### Required node variables for loop outputs
|
|
88
118
|
|
|
89
119
|
For `$vars.<loopId>.currentItem` etc. to resolve, you must add corresponding entries to `variables.nodes`:
|
|
@@ -99,10 +129,10 @@ For `$vars.<loopId>.currentItem` etc. to resolve, you must add corresponding ent
|
|
|
99
129
|
"binding": { "nodeId": "loop1", "outputId": "currentItem" }
|
|
100
130
|
},
|
|
101
131
|
{
|
|
102
|
-
"id": "loop1.
|
|
132
|
+
"id": "loop1.currentIteration",
|
|
103
133
|
"type": "number",
|
|
104
|
-
"description": "The current iteration
|
|
105
|
-
"binding": { "nodeId": "loop1", "outputId": "
|
|
134
|
+
"description": "The current iteration number (1-based)",
|
|
135
|
+
"binding": { "nodeId": "loop1", "outputId": "currentIteration" }
|
|
106
136
|
},
|
|
107
137
|
{
|
|
108
138
|
"id": "loop1.collection",
|
|
@@ -121,6 +151,34 @@ For `$vars.<loopId>.currentItem` etc. to resolve, you must add corresponding ent
|
|
|
121
151
|
}
|
|
122
152
|
```
|
|
123
153
|
|
|
154
|
+
## Aggregated loop output (`$vars.<loopId>.output`)
|
|
155
|
+
|
|
156
|
+
After the loop completes, `$vars.<loopId>.output` is an array with **one entry per iteration**. Each entry is **keyed by body node id**, with that node's outputs nested underneath — it is NOT the body node's bare return value.
|
|
157
|
+
|
|
158
|
+
For a loop `multiplyNumbers` over `[13, 15, 17]` whose body node `multiplyCurrent` is a Script returning `{ number: <n> }`:
|
|
159
|
+
|
|
160
|
+
```json
|
|
161
|
+
[
|
|
162
|
+
{ "multiplyCurrent": { "output": { "number": 13 } } },
|
|
163
|
+
{ "multiplyCurrent": { "output": { "number": 15 } } },
|
|
164
|
+
{ "multiplyCurrent": { "output": { "number": 17 } } }
|
|
165
|
+
]
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
So a downstream Script reads a per-iteration value as `item.<bodyNodeId>.output.<field>`:
|
|
169
|
+
|
|
170
|
+
```javascript
|
|
171
|
+
// CORRECT
|
|
172
|
+
return { product: $vars.multiplyNumbers.output.reduce((p, item) => p * item.multiplyCurrent.output.number, 1) };
|
|
173
|
+
|
|
174
|
+
// WRONG — item.number is undefined; 1 * undefined === NaN
|
|
175
|
+
return { product: $vars.multiplyNumbers.output.reduce((p, item) => p * item.number, 1) };
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
With multiple body nodes, every node that ran in that iteration appears as a sibling key (`{ "fetchData1": { "output": … }, "processItem1": { "output": … } }`), alongside `<bodyNodeId>.error`.
|
|
179
|
+
|
|
180
|
+
> **`flow validate` cannot catch this.** The wrong accessor is valid JS over an `any`-typed array — it validates clean and silently produces `NaN`/`undefined` at runtime. Confirm the shape with one `uip maestro flow debug` run before wiring downstream consumers.
|
|
181
|
+
|
|
124
182
|
## State Accumulation with variableUpdates
|
|
125
183
|
|
|
126
184
|
To accumulate state across loop iterations (counters, running totals), use an `inout` variable with a `variableUpdate` on the body node:
|
|
@@ -140,7 +198,11 @@ To accumulate state across loop iterations (counters, running totals), use an `i
|
|
|
140
198
|
"bodyNode": [
|
|
141
199
|
{
|
|
142
200
|
"variableId": "runningTotal",
|
|
143
|
-
"expression":
|
|
201
|
+
"expression": {
|
|
202
|
+
"type": "jsExpression",
|
|
203
|
+
"expression": "$vars.bodyNode.output",
|
|
204
|
+
"fieldType": "number"
|
|
205
|
+
}
|
|
144
206
|
}
|
|
145
207
|
]
|
|
146
208
|
}
|
|
@@ -150,7 +212,9 @@ To accumulate state across loop iterations (counters, running totals), use an `i
|
|
|
150
212
|
|
|
151
213
|
The variableUpdate fires after each iteration, so the `inout` variable carries the accumulated value into the next iteration.
|
|
152
214
|
|
|
153
|
-
>
|
|
215
|
+
> **`expression` is an object, not a `=js:` string.** `{ "type": "jsExpression", "expression": "<bare JS, no =js: prefix>", "fieldType": "<target variable's type>" }`. The legacy string form fails `flow validate` with `[MIGRATION] Workflow migration failed at 1.9→1.10 … Offending field(s): variables.variableUpdates.<nodeId>.0.expression` and `"Retry": "RetryWillNotFix"`. Write it with `Edit` — there is no CLI command for variable updates. See [shared/variables-and-expressions.md § Variable Updates](../../../../shared/variables-and-expressions.md#variable-updates-variableupdates).
|
|
216
|
+
|
|
217
|
+
> **Critical:** The variableUpdate expression **cannot** access loop iteration variables like `$vars.<loopId>.currentItem`. These are only available inside the body node's script. The variableUpdate must reference the body node's output (e.g., `$vars.bodyNode.output`). If you need to compute using `currentItem`, do the computation in the script and reference the script's output in the variableUpdate.
|
|
154
218
|
|
|
155
219
|
## Complete Example — Loop with State Accumulation
|
|
156
220
|
|
|
@@ -169,14 +233,14 @@ A flow that iterates over a collection, accumulates a result in an `inout` varia
|
|
|
169
233
|
{
|
|
170
234
|
"id": "loop1",
|
|
171
235
|
"type": "core.logic.loop",
|
|
172
|
-
"typeVersion": "
|
|
236
|
+
"typeVersion": "<DEFINITION_VERSION>",
|
|
173
237
|
"display": { "label": "Loop" },
|
|
174
238
|
"inputs": { "collection": "=js:$vars.inputItems", "parallel": false }
|
|
175
239
|
},
|
|
176
240
|
{
|
|
177
241
|
"id": "bodyScript",
|
|
178
242
|
"type": "core.action.script",
|
|
179
|
-
"typeVersion": "
|
|
243
|
+
"typeVersion": "<DEFINITION_VERSION>",
|
|
180
244
|
"display": { "label": "Process item" },
|
|
181
245
|
"inputs": {
|
|
182
246
|
"script": "return $vars.accumulator + $vars.loop1.currentItem;"
|
|
@@ -196,27 +260,34 @@ A flow that iterates over a collection, accumulates a result in an `inout` varia
|
|
|
196
260
|
],
|
|
197
261
|
"edges": [
|
|
198
262
|
{ "id": "e1", "sourceNodeId": "start", "sourcePort": "output", "targetNodeId": "loop1", "targetPort": "input" },
|
|
199
|
-
{ "id": "e2", "sourceNodeId": "loop1", "sourcePort": "
|
|
200
|
-
{ "id": "e3", "sourceNodeId": "bodyScript", "sourcePort": "success", "targetNodeId": "loop1", "targetPort": "
|
|
263
|
+
{ "id": "e2", "sourceNodeId": "loop1", "sourcePort": "start", "targetNodeId": "bodyScript", "targetPort": "input" },
|
|
264
|
+
{ "id": "e3", "sourceNodeId": "bodyScript", "sourcePort": "success", "targetNodeId": "loop1", "targetPort": "continue" },
|
|
201
265
|
{ "id": "e4", "sourceNodeId": "loop1", "sourcePort": "success", "targetNodeId": "end1", "targetPort": "input" }
|
|
202
266
|
],
|
|
203
267
|
"variables": {
|
|
204
268
|
"globals": [
|
|
205
|
-
{ "id": "inputItems", "direction": "in", "type": "array", "defaultValue": [] },
|
|
269
|
+
{ "id": "inputItems", "direction": "in", "type": "array", "defaultValue": [], "triggerNodeId": "start" },
|
|
206
270
|
{ "id": "accumulator", "direction": "inout", "type": "number", "defaultValue": 0 },
|
|
207
271
|
{ "id": "result", "direction": "out", "type": "number" }
|
|
208
272
|
],
|
|
209
273
|
"nodes": [
|
|
210
274
|
{ "id": "loop1.currentItem", "type": "any", "binding": { "nodeId": "loop1", "outputId": "currentItem" } },
|
|
211
|
-
{ "id": "loop1.
|
|
275
|
+
{ "id": "loop1.currentIteration", "type": "number", "binding": { "nodeId": "loop1", "outputId": "currentIteration" } },
|
|
212
276
|
{ "id": "loop1.collection", "type": "array", "binding": { "nodeId": "loop1", "outputId": "collection" } },
|
|
213
277
|
{ "id": "loop1.output", "type": "array", "binding": { "nodeId": "loop1", "outputId": "output" } },
|
|
214
|
-
{ "id": "bodyScript.output", "type": "
|
|
278
|
+
{ "id": "bodyScript.output", "type": "any", "binding": { "nodeId": "bodyScript", "outputId": "output" } },
|
|
215
279
|
{ "id": "bodyScript.error", "type": "object", "binding": { "nodeId": "bodyScript", "outputId": "error" } }
|
|
216
280
|
],
|
|
217
281
|
"variableUpdates": {
|
|
218
282
|
"bodyScript": [
|
|
219
|
-
{
|
|
283
|
+
{
|
|
284
|
+
"variableId": "accumulator",
|
|
285
|
+
"expression": {
|
|
286
|
+
"type": "jsExpression",
|
|
287
|
+
"expression": "$vars.bodyScript.output",
|
|
288
|
+
"fieldType": "number"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
220
291
|
]
|
|
221
292
|
}
|
|
222
293
|
}
|
|
@@ -226,9 +297,93 @@ A flow that iterates over a collection, accumulates a result in an `inout` varia
|
|
|
226
297
|
Key points in this pattern:
|
|
227
298
|
- `bodyScript` has `"parentId": "loop1"` — places it inside the loop
|
|
228
299
|
- Script accesses `$vars.loop1.currentItem` for the current iteration value
|
|
229
|
-
- `variableUpdate` on `bodyScript` writes the script's return value back to `accumulator`
|
|
300
|
+
- `variableUpdate` on `bodyScript` writes the script's return value back to `accumulator`, using the object `expression` form with `fieldType` matching `accumulator`'s declared `number` type
|
|
230
301
|
- `accumulator` is `inout` so it persists across iterations
|
|
231
|
-
- End node maps the final accumulated value to the `out` variable
|
|
302
|
+
- End node maps the final accumulated value to the `out` variable — also map `accumulator` itself, or `flow validate` warns `MISSING_OUTPUT_MAPPING` for the unmapped `inout` global
|
|
303
|
+
- Body edges use the loop's inner handles — `start` out, `continue` back — not `output`/`loopBack`
|
|
304
|
+
|
|
305
|
+
> **Prefer this pattern over post-processing `$vars.loop1.output`** when you need a running total. If you do consume the aggregate array instead, read each entry as `item.<bodyNodeId>.output.<field>` — see [Aggregated loop output](#aggregated-loop-output-varsloopidoutput).
|
|
306
|
+
|
|
307
|
+
## Complete Example — Multi-Node Loop Body (HTTP + Script)
|
|
308
|
+
|
|
309
|
+
Loop over items, fetch data per-iteration via HTTP, process with a script. Both body nodes have `parentId`.
|
|
310
|
+
|
|
311
|
+
```json
|
|
312
|
+
{
|
|
313
|
+
"nodes": [
|
|
314
|
+
{
|
|
315
|
+
"id": "start",
|
|
316
|
+
"type": "core.trigger.manual",
|
|
317
|
+
"typeVersion": "1.0",
|
|
318
|
+
"display": { "label": "Manual trigger" },
|
|
319
|
+
"inputs": { "entryPointId": "..." }
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"id": "loop1",
|
|
323
|
+
"type": "core.logic.loop",
|
|
324
|
+
"typeVersion": "<DEFINITION_VERSION>",
|
|
325
|
+
"display": { "label": "For each item" },
|
|
326
|
+
"inputs": {
|
|
327
|
+
"collection": "=js:[{ name: 'A', id: 1 }, { name: 'B', id: 2 }]",
|
|
328
|
+
"parallel": false
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"id": "fetchData1",
|
|
333
|
+
"type": "core.action.http.v2",
|
|
334
|
+
"typeVersion": "<DEFINITION_VERSION>",
|
|
335
|
+
"display": { "label": "Fetch data" },
|
|
336
|
+
"inputs": { "branches": [], "timeout": "PT15M", "retryCount": 0, "detail": {} },
|
|
337
|
+
"parentId": "loop1"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"id": "processItem1",
|
|
341
|
+
"type": "core.action.script",
|
|
342
|
+
"typeVersion": "<DEFINITION_VERSION>",
|
|
343
|
+
"display": { "label": "Process item" },
|
|
344
|
+
"inputs": {
|
|
345
|
+
"script": "return { name: $vars.loop1.currentItem.name, value: $vars.fetchData1.output.body.result };"
|
|
346
|
+
},
|
|
347
|
+
"parentId": "loop1"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"id": "end1",
|
|
351
|
+
"type": "core.control.end",
|
|
352
|
+
"typeVersion": "1.0",
|
|
353
|
+
"display": { "label": "End" },
|
|
354
|
+
"inputs": {},
|
|
355
|
+
"outputs": { "results": { "source": "=js:$vars.loop1.output" } }
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
"edges": [
|
|
359
|
+
{ "id": "e1", "sourceNodeId": "start", "sourcePort": "output", "targetNodeId": "loop1", "targetPort": "input" },
|
|
360
|
+
{ "id": "e2", "sourceNodeId": "loop1", "sourcePort": "start", "targetNodeId": "fetchData1", "targetPort": "input" },
|
|
361
|
+
{ "id": "e3", "sourceNodeId": "fetchData1", "sourcePort": "default", "targetNodeId": "processItem1", "targetPort": "input" },
|
|
362
|
+
{ "id": "e4", "sourceNodeId": "processItem1", "sourcePort": "success", "targetNodeId": "loop1", "targetPort": "continue" },
|
|
363
|
+
{ "id": "e5", "sourceNodeId": "loop1", "sourcePort": "success", "targetNodeId": "end1", "targetPort": "input" }
|
|
364
|
+
],
|
|
365
|
+
"variables": {
|
|
366
|
+
"globals": [
|
|
367
|
+
{ "id": "results", "direction": "out", "type": "array" }
|
|
368
|
+
],
|
|
369
|
+
"nodes": [
|
|
370
|
+
{ "id": "loop1.currentItem", "type": "any", "binding": { "nodeId": "loop1", "outputId": "currentItem" } },
|
|
371
|
+
{ "id": "loop1.currentIteration", "type": "number", "binding": { "nodeId": "loop1", "outputId": "currentIteration" } },
|
|
372
|
+
{ "id": "loop1.collection", "type": "array", "binding": { "nodeId": "loop1", "outputId": "collection" } },
|
|
373
|
+
{ "id": "loop1.output", "type": "array", "binding": { "nodeId": "loop1", "outputId": "output" } },
|
|
374
|
+
{ "id": "fetchData1.output", "type": "object", "binding": { "nodeId": "fetchData1", "outputId": "output" } },
|
|
375
|
+
{ "id": "fetchData1.error", "type": "object", "binding": { "nodeId": "fetchData1", "outputId": "error" } },
|
|
376
|
+
{ "id": "processItem1.output", "type": "any", "binding": { "nodeId": "processItem1", "outputId": "output" } },
|
|
377
|
+
{ "id": "processItem1.error", "type": "object", "binding": { "nodeId": "processItem1", "outputId": "error" } }
|
|
378
|
+
]
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
- Both `fetchData1` and `processItem1` have `"parentId": "loop1"` — omitting it on either causes null outputs at runtime while validation passes
|
|
384
|
+
- HTTP body uses `start`/`default` ports; script returns via `success`/`continue`
|
|
385
|
+
- `detail` on HTTP node is abbreviated — populate via `uip maestro flow node configure`
|
|
386
|
+
- `results` receives the aggregate array verbatim, so each entry looks like `{ "fetchData1": { "output": … }, "processItem1": { "output": … } }` — both body nodes as sibling keys. Flatten it in a Script node after the loop if the consumer expects bare values. See [Aggregated loop output](#aggregated-loop-output-varsloopidoutput).
|
|
232
387
|
|
|
233
388
|
## Debug
|
|
234
389
|
|
|
@@ -236,7 +391,12 @@ Key points in this pattern:
|
|
|
236
391
|
| --- | --- | --- |
|
|
237
392
|
| Collection is empty or null | Expression evaluates to null/undefined | Check `collection` expression and upstream output |
|
|
238
393
|
| `$vars.loop1.currentItem` is undefined | Missing node variable binding or missing `parentId` | Add `loop1.currentItem` to `variables.nodes` and set `parentId` on body nodes |
|
|
394
|
+
| `$vars.loop1.currentIndex` is undefined | The output is named `currentIteration` (1-based); there is no `currentIndex`, and a binding to it still validates | Use `$vars.<loopId>.currentIteration` and subtract 1 if you need a 0-based index |
|
|
395
|
+
| `flow validate` fails: `[MIGRATION] … 1.9→1.10 … Offending field(s): variables.variableUpdates.<nodeId>.0.expression` | `variableUpdates[].expression` written as a legacy `=js:` string | Rewrite with `Edit` as `{ "type": "jsExpression", "expression": "<bare JS>", "fieldType": "<target variable type>" }` |
|
|
396
|
+
| `flow validate` fails: `[variables.variableUpdates.<nodeId>[0].expression] Invalid input` | The expression object is malformed — missing one of the three keys, carrying an extra key, or an unknown `type` | Use exactly `type` + `expression` + `fieldType`; the object is strict |
|
|
397
|
+
| `flow validate` fails: `Edge references undeclared source handle "output"` / `target handle "loopBack"` | Loop body wired to ports that do not exist | Use the inner handles: `start` out of the loop, `continue` back into it |
|
|
239
398
|
| State variable not updating across iterations | Body node missing `parentId` | Add `"parentId": "<loopId>"` to every node inside the loop body |
|
|
240
399
|
| State variable becomes `NaN` | variableUpdate expression uses `$vars.<loopId>.currentItem` | Loop variables are not available in variableUpdate expressions. Do the computation in the script and reference `$vars.<bodyNodeId>.output` in the variableUpdate |
|
|
241
|
-
|
|
|
400
|
+
| Downstream value is `NaN`/`undefined` after reducing `$vars.<loopId>.output` | Entries are keyed by body node id, not the body's bare return value | Read `item.<bodyNodeId>.output.<field>`, not `item.<field>` — see [Aggregated loop output](#aggregated-loop-output-varsloopidoutput) |
|
|
401
|
+
| Infinite loop | Edges wired incorrectly | Ensure only the body's `continue` edge creates the cycle, not arbitrary edges |
|
|
242
402
|
| No output after loop | Missing `success` edge | Wire the `success` port to the next downstream node |
|
|
@@ -19,15 +19,21 @@ Use a Loop node to iterate over a collection of items. Supports sequential and p
|
|
|
19
19
|
|
|
20
20
|
## Ports
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
|
22
|
+
The loop is a container node, so its handles split across an outer and an inner boundary.
|
|
23
|
+
|
|
24
|
+
| Boundary | Input Port(s) | Output Port(s) |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| outer | `input` | `success`, `error` |
|
|
27
|
+
| inner | `continue`, `break` | `start` |
|
|
25
28
|
|
|
26
|
-
- `
|
|
29
|
+
- `start` — feeds the first node inside the loop body
|
|
30
|
+
- `continue` — receives the edge returning from the last node inside the loop body
|
|
31
|
+
- `break` — early exit from inside the body (only when `breakEnabled`)
|
|
27
32
|
- `success` — fires after all iterations complete
|
|
28
|
-
- `output` — carries aggregated results from all iterations
|
|
29
33
|
- `error` — implicit error port shared with all action nodes; fires when the loop or an iteration throws. See [Implicit error port on action nodes](../../../../shared/file-format.md#implicit-error-port-on-action-nodes).
|
|
30
34
|
|
|
35
|
+
> Aggregated results are an output **variable** (`$vars.<loopId>.output`), not a port.
|
|
36
|
+
|
|
31
37
|
## Key Inputs
|
|
32
38
|
|
|
33
39
|
| Input | Required | Description |
|
|
@@ -38,15 +44,17 @@ Use a Loop node to iterate over a collection of items. Supports sequential and p
|
|
|
38
44
|
## Loop Variables (available inside loop body only)
|
|
39
45
|
|
|
40
46
|
- `$vars.<loopId>.currentItem` — the item being processed in this iteration
|
|
41
|
-
- `$vars.<loopId>.
|
|
47
|
+
- `$vars.<loopId>.currentIteration` — 1-based iteration number (there is no `currentIndex`)
|
|
42
48
|
- `$vars.<loopId>.collection` — the full collection
|
|
43
49
|
|
|
44
50
|
Where `<loopId>` is the loop node's `id` (e.g., `$vars.loop1.currentItem`).
|
|
45
51
|
|
|
52
|
+
After the loop, `$vars.<loopId>.output` holds one entry per iteration, each keyed by body node id — plan a flattening step if a downstream consumer needs bare values.
|
|
53
|
+
|
|
46
54
|
## Wiring Rules
|
|
47
55
|
|
|
48
|
-
- The loop body starts from the `
|
|
49
|
-
- The last node in the loop body connects back to the loop's `
|
|
50
|
-
- After all iterations, execution continues from the `success` port
|
|
51
|
-
- Do not create cycles except through the `
|
|
56
|
+
- The loop body starts from the loop node's inner `start` port
|
|
57
|
+
- The last node in the loop body connects back to the loop's inner `continue` port
|
|
58
|
+
- After all iterations, execution continues from the outer `success` port
|
|
59
|
+
- Do not create cycles except through the `continue` handle
|
|
52
60
|
- **Every node inside the loop body must have `"parentId": "<loopId>"`** — without this, variableUpdates will not fire per-iteration and loop variables will be inaccessible
|