@uipath/skills 1.201.0-preview.621 → 1.202.0-preview.635
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 +1 -1
- package/CODEOWNERS +41 -29
- package/README.md +1 -0
- package/assets/skill-status.json +13 -2
- package/assets/uip-catalog-snapshot.json +95 -46
- package/package.json +2 -1
- package/skills/uipath-admin/SKILL.md +107 -197
- package/skills/uipath-admin/references/audit-commands.md +69 -120
- package/skills/uipath-admin/references/audit-workflow-guide.md +101 -152
- package/skills/uipath-admin/references/authorization/authorization-commands.md +121 -210
- package/skills/uipath-admin/references/authorization/check-access.md +39 -63
- package/skills/uipath-admin/references/authorization/grant-permissions.md +38 -49
- package/skills/uipath-admin/references/authorization/permission-catalog.md +32 -34
- package/skills/uipath-admin/references/authorization/role-assignment-management.md +96 -99
- package/skills/uipath-admin/references/authorization/role-management.md +113 -142
- package/skills/uipath-admin/references/diagnose/CAPABILITY.md +13 -14
- package/skills/uipath-admin/references/diagnose/{references/failure-modes.md → failure-modes.md} +90 -46
- package/skills/uipath-admin/references/diagnose/{references/troubleshooting-guide.md → troubleshooting-guide.md} +21 -14
- package/skills/uipath-admin/references/external-app-management.md +42 -39
- package/skills/uipath-admin/references/identity-commands.md +72 -625
- package/skills/uipath-admin/references/identity-troubleshoot-guide.md +73 -95
- package/skills/uipath-admin/references/ip-restriction/bypass-rule-management.md +25 -54
- package/skills/uipath-admin/references/ip-restriction/enforcement-management.md +19 -31
- package/skills/uipath-admin/references/ip-restriction/ip-range-management.md +48 -45
- package/skills/uipath-admin/references/ip-restriction/ip-restriction-commands.md +89 -146
- package/skills/uipath-admin/references/key-concepts.md +24 -0
- package/skills/uipath-admin/references/organization-management.md +49 -70
- package/skills/uipath-admin/references/organizations-commands.md +39 -74
- package/skills/uipath-admin/references/pat-management.md +25 -38
- package/skills/uipath-admin/references/robot-account-management.md +16 -14
- package/skills/uipath-admin/references/smtp-management.md +19 -14
- package/skills/uipath-admin/references/tenant-management.md +1 -1
- package/skills/uipath-admin/references/tenants-commands.md +82 -148
- package/skills/uipath-admin/references/user-management.md +70 -56
- package/skills/uipath-agents/SKILL.md +4 -3
- package/skills/uipath-agents/references/authentication.md +4 -3
- package/skills/uipath-agents/references/coded/capabilities/datafabric.md +465 -0
- package/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails-recommend.md +5 -0
- package/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails.md +2 -0
- package/skills/uipath-agents/references/coded/capabilities/human-in-the-loop.md +12 -6
- package/skills/uipath-agents/references/coded/flow-integration.md +2 -2
- package/skills/uipath-agents/references/coded/frameworks/langgraph-integration.md +48 -16
- package/skills/uipath-agents/references/coded/frameworks/openai-agents-integration.md +1 -1
- package/skills/uipath-agents/references/coded/lifecycle/deployment.md +11 -1
- package/skills/uipath-agents/references/coded/quickstart.md +11 -8
- package/skills/uipath-agents/references/lowcode/capabilities/inline-in-flow/inline-in-flow.md +3 -3
- package/skills/uipath-agents/references/lowcode/capabilities/memory/memory.md +19 -2
- package/skills/uipath-agents/references/lowcode/evaluations/evaluate.md +2 -2
- package/skills/uipath-agents/references/lowcode/evaluations/orchestrator-eval-run.md +409 -155
- package/skills/uipath-agents/references/lowcode/evaluations/running-evaluations.md +2 -2
- package/skills/uipath-agents/references/lowcode/prompting/autonomous-agent-prompting-guide.md +1 -1
- package/skills/uipath-aops/SKILL.md +313 -0
- package/skills/uipath-aops/assets/templates/pipeline-dto-template.json +15 -0
- package/skills/uipath-aops/references/discovery-flow.md +312 -0
- package/skills/uipath-aops/references/migration-guide.md +146 -0
- package/skills/uipath-aops/references/pipeline-dto-guide.md +276 -0
- package/skills/uipath-aops/references/save-and-run-guide.md +156 -0
- package/skills/uipath-api-workflow/SKILL.md +48 -6
- package/skills/uipath-api-workflow/assets/templates/file-base64-roundtrip-example.json +154 -0
- package/skills/uipath-api-workflow/assets/templates/nested-control-flow-example.json +0 -1
- package/skills/uipath-api-workflow/references/cli-reference.md +20 -1
- package/skills/uipath-api-workflow/references/expressions-and-context.md +19 -0
- package/skills/uipath-api-workflow/references/files-and-base64.md +153 -0
- package/skills/uipath-api-workflow/references/operating-published-workflows.md +3 -2
- package/skills/uipath-api-workflow/references/task-types.md +89 -3
- package/skills/uipath-api-workflow/references/testing-and-evals.md +224 -0
- package/skills/uipath-api-workflow/references/troubleshooting.md +124 -4
- package/skills/uipath-coded-apps/SKILL.md +4 -2
- package/skills/uipath-coded-apps/assets/scripts/dashboards/build-dashboard.mjs +1 -1
- package/skills/uipath-coded-apps/references/dashboards/CAPABILITY.md +11 -1
- package/skills/uipath-coded-apps/references/dashboards/plugins/build/impl.md +5 -3
- package/skills/uipath-coded-apps/references/dashboards/plugins/deploy/impl.md +1 -0
- package/skills/uipath-coded-apps/references/oauth-client-setup.md +2 -0
- package/skills/uipath-coded-apps/references/pack-publish-deploy.md +18 -0
- package/skills/uipath-coded-apps/references/sdk/orchestrator.md +4 -0
- package/skills/uipath-connector-builder/SKILL.md +7 -5
- package/skills/uipath-connector-builder/references/debugging.md +5 -1
- package/skills/uipath-connector-builder/references/element-json.md +3 -1
- package/skills/uipath-connector-builder/references/standard-resources.md +37 -6
- package/skills/uipath-functions/SKILL.md +134 -222
- package/skills/uipath-functions/references/js/authoring-guide.md +141 -0
- package/skills/uipath-functions/references/js/bindings-guide.md +120 -0
- package/skills/uipath-functions/references/js/calling-uipath-apis-guide.md +112 -0
- package/skills/uipath-functions/references/js/coded-app-wiring-guide.md +103 -0
- package/skills/uipath-functions/references/js/deployment-guide.md +109 -0
- package/skills/uipath-functions/references/js/http-semantics-guide.md +80 -0
- package/skills/uipath-functions/references/js/job-mode-guide.md +114 -0
- package/skills/uipath-functions/references/js/local-dev-guide.md +107 -0
- package/skills/uipath-functions/references/python/workflow-guide.md +224 -0
- package/skills/uipath-governance/SKILL.md +9 -8
- package/skills/uipath-governance/references/compliance-pack/catalog/impl.md +36 -8
- package/skills/uipath-governance/references/compliance-pack/coverage/impl.md +14 -12
- package/skills/uipath-governance/references/compliance-pack/disable/impl.md +5 -3
- package/skills/uipath-governance/references/compliance-pack/full-apply/impl.md +7 -5
- package/skills/uipath-governance/references/compliance-pack/partial-apply/impl.md +14 -7
- package/skills/uipath-governance/references/compliance-pack/partial-apply/planning.md +3 -1
- package/skills/uipath-governance/references/compliance-pack/preview-gate.md +1 -1
- package/skills/uipath-governance/references/compliance-pack/query/impl.md +4 -2
- package/skills/uipath-governance/references/diagnose/CAPABILITY.md +12 -12
- package/skills/uipath-governance/references/diagnose/{references/failure-modes.md → failure-modes.md} +5 -5
- package/skills/uipath-governance/references/diagnose/{references/troubleshooting-guide.md → troubleshooting-guide.md} +2 -2
- package/skills/uipath-governance/references/disambiguation-guide.md +15 -7
- package/skills/uipath-human-in-the-loop/SKILL.md +107 -9
- package/skills/uipath-human-in-the-loop/references/hitl-casetask-action.md +413 -0
- package/skills/uipath-insights/SKILL.md +21 -14
- package/skills/uipath-insights/references/alerts-reads-guide.md +242 -0
- package/skills/uipath-insights/references/filter-discovery-guide.md +1 -1
- package/skills/uipath-insights/references/jobs-commands-guide.md +2 -2
- package/skills/uipath-ixp/references/cli-reference.md +1 -1
- package/skills/uipath-ixp/references/improve-prompts-guide.md +5 -6
- package/skills/uipath-maestro-bpmn/SKILL.md +87 -15
- package/skills/uipath-maestro-bpmn/references/diagnose/CAPABILITY.md +10 -10
- package/skills/uipath-maestro-bpmn/references/diagnose/{references/troubleshooting-guide.md → troubleshooting-guide.md} +1 -1
- package/skills/uipath-maestro-bpmn/references/expression-authoring.md +12 -2
- package/skills/uipath-maestro-bpmn/references/operate/CAPABILITY.md +12 -12
- package/skills/uipath-maestro-bpmn/references/operate/{references/run.md → run.md} +2 -2
- package/skills/uipath-maestro-bpmn/references/operate/{references/ship.md → ship.md} +3 -3
- package/skills/uipath-maestro-bpmn/references/patterns/ai-decision-review-guide.md +138 -0
- package/skills/uipath-maestro-bpmn/references/patterns/approval-chain-guide.md +136 -0
- package/skills/uipath-maestro-bpmn/references/patterns/composing-guide.md +113 -0
- package/skills/uipath-maestro-bpmn/references/patterns/external-wait-guide.md +145 -0
- package/skills/uipath-maestro-bpmn/references/patterns/failure-escalation-guide.md +103 -0
- package/skills/uipath-maestro-bpmn/references/patterns/high-volume-batch-guide.md +107 -0
- package/skills/uipath-maestro-bpmn/references/patterns/queue-distribution-guide.md +129 -0
- package/skills/uipath-maestro-bpmn/references/patterns/smart-triage-guide.md +129 -0
- package/skills/uipath-maestro-bpmn/references/registry-workflow.md +15 -0
- package/skills/uipath-maestro-bpmn/references/shared/local-metadata-regeneration-guide.md +67 -36
- package/skills/uipath-maestro-bpmn/references/shared/project-layout.md +6 -5
- package/skills/uipath-maestro-bpmn/references/structural-bpmn.md +23 -5
- package/skills/uipath-maestro-bpmn/validator/bpmn-spec.json +101 -53
- package/skills/uipath-maestro-case/SKILL.md +23 -24
- package/skills/uipath-maestro-case/references/bindings-and-expressions.md +30 -17
- package/skills/uipath-maestro-case/references/bindings-v2-sync.md +5 -5
- package/skills/uipath-maestro-case/references/brownfield.md +3 -3
- package/skills/uipath-maestro-case/references/case-commands.md +8 -4
- package/skills/uipath-maestro-case/references/case-editing-operations.md +19 -19
- package/skills/uipath-maestro-case/references/case-schema.md +17 -3
- package/skills/uipath-maestro-case/references/connector-integration.md +25 -16
- package/skills/uipath-maestro-case/references/connector-trigger-impl.md +15 -15
- package/skills/uipath-maestro-case/references/connector-trigger-planning.md +32 -29
- package/skills/uipath-maestro-case/references/entry-points-sync.md +2 -1
- package/skills/uipath-maestro-case/references/evals/evals.json +11 -11
- package/skills/uipath-maestro-case/references/implementation.md +74 -44
- package/skills/uipath-maestro-case/references/phased-execution.md +23 -21
- package/skills/uipath-maestro-case/references/placeholder-tasks.md +28 -23
- package/skills/uipath-maestro-case/references/planning.md +37 -252
- package/skills/uipath-maestro-case/references/plugins/case/impl-json.md +3 -3
- package/skills/uipath-maestro-case/references/plugins/case/planning.md +8 -6
- package/skills/uipath-maestro-case/references/plugins/conditions/case-exit-conditions/impl-json.md +3 -3
- package/skills/uipath-maestro-case/references/plugins/conditions/case-exit-conditions/planning.md +11 -10
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/impl-json.md +6 -6
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/planning.md +12 -12
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/impl-json.md +4 -4
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/planning.md +10 -9
- package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/impl-json.md +5 -5
- package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/planning.md +16 -14
- package/skills/uipath-maestro-case/references/plugins/logging/impl-json.md +3 -3
- package/skills/uipath-maestro-case/references/plugins/sla/impl-json.md +15 -15
- package/skills/uipath-maestro-case/references/plugins/sla/planning.md +20 -21
- package/skills/uipath-maestro-case/references/plugins/stages/impl-json.md +6 -6
- package/skills/uipath-maestro-case/references/plugins/stages/planning.md +9 -9
- package/skills/uipath-maestro-case/references/plugins/tasks/action/impl-json.md +9 -9
- package/skills/uipath-maestro-case/references/plugins/tasks/action/planning.md +38 -38
- package/skills/uipath-maestro-case/references/plugins/tasks/agent/impl-json.md +3 -3
- package/skills/uipath-maestro-case/references/plugins/tasks/agent/planning.md +24 -20
- package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/impl-json.md +3 -3
- package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/planning.md +24 -20
- package/skills/uipath-maestro-case/references/plugins/tasks/case-management/impl-json.md +4 -4
- package/skills/uipath-maestro-case/references/plugins/tasks/case-management/planning.md +25 -21
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/impl-json.md +30 -22
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/planning.md +44 -28
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/impl-json.md +10 -10
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/planning.md +27 -23
- package/skills/uipath-maestro-case/references/plugins/tasks/create-inline-common.md +3 -3
- package/skills/uipath-maestro-case/references/plugins/tasks/process/impl-json.md +3 -3
- package/skills/uipath-maestro-case/references/plugins/tasks/process/planning.md +25 -22
- package/skills/uipath-maestro-case/references/plugins/tasks/rpa/impl-json.md +3 -3
- package/skills/uipath-maestro-case/references/plugins/tasks/rpa/planning.md +25 -21
- package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/impl-json.md +4 -4
- package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/planning.md +5 -4
- package/skills/uipath-maestro-case/references/plugins/triggers/event/impl-json.md +9 -9
- package/skills/uipath-maestro-case/references/plugins/triggers/event/planning.md +30 -19
- package/skills/uipath-maestro-case/references/plugins/triggers/manual/impl-json.md +4 -4
- package/skills/uipath-maestro-case/references/plugins/triggers/manual/planning.md +8 -7
- package/skills/uipath-maestro-case/references/plugins/triggers/timer/impl-json.md +3 -3
- package/skills/uipath-maestro-case/references/plugins/triggers/timer/planning.md +5 -4
- package/skills/uipath-maestro-case/references/plugins/variables/bindings/impl-json.md +5 -5
- package/skills/uipath-maestro-case/references/plugins/variables/global-vars/impl-json.md +7 -7
- package/skills/uipath-maestro-case/references/plugins/variables/global-vars/planning.md +21 -17
- package/skills/uipath-maestro-case/references/plugins/variables/io-binding/impl-json.md +29 -21
- package/skills/uipath-maestro-case/references/plugins/variables/io-binding/planning.md +23 -21
- package/skills/uipath-maestro-case/references/registry-discovery.md +5 -5
- package/skills/uipath-maestro-flow/.maintenance/README.md +35 -28
- package/skills/uipath-maestro-flow/.maintenance/check-anchors.sh +19 -1
- package/skills/uipath-maestro-flow/.maintenance/check-links.sh +3 -0
- package/skills/uipath-maestro-flow/.maintenance/check-plugin-pairs.sh +2 -2
- package/skills/uipath-maestro-flow/SKILL.md +66 -76
- package/skills/uipath-maestro-flow/references/author/CAPABILITY.md +75 -72
- package/skills/uipath-maestro-flow/references/author/brownfield.md +90 -0
- package/skills/uipath-maestro-flow/references/author/{references/editing-operations-cli.md → editing-operations-cli.md} +9 -4
- package/skills/uipath-maestro-flow/references/author/editing-operations-json.md +373 -0
- package/skills/uipath-maestro-flow/references/author/editing-operations.md +103 -0
- package/skills/uipath-maestro-flow/references/author/{references/greenfield.md → greenfield.md} +32 -20
- package/skills/uipath-maestro-flow/references/author/planning-arch.md +342 -0
- package/skills/uipath-maestro-flow/references/author/planning-impl.md +283 -0
- package/skills/uipath-maestro-flow/references/author/plugins/agent/impl.md +227 -0
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/agent/planning.md +2 -2
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/agentic-process/impl.md +2 -2
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/agentic-process/planning.md +1 -1
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/api-workflow/impl.md +2 -2
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/api-workflow/planning.md +1 -1
- package/skills/uipath-maestro-flow/references/author/plugins/batch-transform/impl.md +171 -0
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/batch-transform/planning.md +1 -1
- package/skills/uipath-maestro-flow/references/author/plugins/connector/impl.md +449 -0
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/connector/planning.md +3 -3
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/connector-trigger/impl.md +20 -18
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/connector-trigger/planning.md +2 -2
- package/skills/uipath-maestro-flow/references/author/plugins/data-fabric/impl.md +427 -0
- package/skills/uipath-maestro-flow/references/author/plugins/data-fabric/planning.md +185 -0
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/decision/impl.md +5 -0
- package/skills/uipath-maestro-flow/references/author/plugins/delay/impl.md +38 -0
- package/skills/uipath-maestro-flow/references/author/plugins/end/impl.md +56 -0
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/flow/impl.md +2 -2
- package/skills/uipath-maestro-flow/references/author/plugins/hitl/impl.md +178 -0
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/hitl/planning.md +14 -1
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/http/impl-connector.md +4 -4
- package/skills/uipath-maestro-flow/references/author/plugins/http/impl-manual.md +68 -0
- package/skills/uipath-maestro-flow/references/author/plugins/http/impl.md +173 -0
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/http/planning.md +3 -3
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/inline-agent/impl.md +6 -6
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/inline-agent/planning.md +1 -1
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/inline-voice-agent/impl.md +4 -4
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/inline-voice-agent/planning.md +1 -1
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/ixp/impl.md +8 -8
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/loop/impl.md +1 -1
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/loop/planning.md +1 -1
- package/skills/uipath-maestro-flow/references/author/plugins/merge/impl.md +43 -0
- package/skills/uipath-maestro-flow/references/author/plugins/merge/planning.md +24 -0
- package/skills/uipath-maestro-flow/references/author/plugins/rpa/impl.md +117 -0
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/rpa/planning.md +1 -1
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/scheduled-trigger/impl.md +6 -8
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/script/impl.md +5 -5
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/script/planning.md +1 -1
- package/skills/uipath-maestro-flow/references/author/plugins/subflow/impl.md +164 -0
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/subflow/planning.md +1 -1
- package/skills/uipath-maestro-flow/references/author/plugins/summarize/impl.md +189 -0
- package/skills/uipath-maestro-flow/references/author/plugins/summarize/planning.md +66 -0
- package/skills/uipath-maestro-flow/references/author/plugins/switch/planning.md +34 -0
- package/skills/uipath-maestro-flow/references/author/plugins/terminate/impl.md +48 -0
- package/skills/uipath-maestro-flow/references/author/plugins/transform/impl.md +241 -0
- package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/transform/planning.md +1 -1
- package/skills/uipath-maestro-flow/references/diagnose/CAPABILITY.md +39 -37
- package/skills/uipath-maestro-flow/references/diagnose/{references/failure-modes.md → failure-modes.md} +22 -22
- package/skills/uipath-maestro-flow/references/diagnose/{references/troubleshooting-guide.md → troubleshooting-guide.md} +60 -1
- package/skills/uipath-maestro-flow/references/evaluate/CAPABILITY.md +27 -25
- package/skills/uipath-maestro-flow/references/evaluate/{references/commands-reference.md → commands-reference.md} +58 -7
- package/skills/uipath-maestro-flow/references/evaluate/eval-sets-guide.md +227 -0
- package/skills/uipath-maestro-flow/references/evaluate/upload-safety.md +94 -0
- package/skills/uipath-maestro-flow/references/operate/CAPABILITY.md +21 -21
- package/skills/uipath-maestro-flow/references/operate/{references/manage.md → manage.md} +4 -4
- package/skills/uipath-maestro-flow/references/operate/run.md +121 -0
- package/skills/uipath-maestro-flow/references/operate/{references/ship.md → ship.md} +5 -5
- package/skills/uipath-maestro-flow/references/shared/action-nodes.md +30 -22
- package/skills/uipath-maestro-flow/references/shared/cli-commands.md +76 -184
- package/skills/uipath-maestro-flow/references/shared/cli-conventions.md +49 -60
- package/skills/uipath-maestro-flow/references/shared/file-format.md +32 -11
- package/skills/uipath-maestro-flow/references/shared/node-output-wiring.md +49 -104
- package/skills/uipath-maestro-flow/references/shared/ux-narration-and-todos.md +66 -103
- package/skills/uipath-maestro-flow/references/shared/variables-and-expressions.md +4 -4
- package/skills/uipath-planner/SKILL.md +1 -1
- package/skills/uipath-planner/assets/templates/case/case-sdd-template.md +5 -3
- package/skills/uipath-planner/references/case/case-design-lane-guide.md +1 -1
- package/skills/uipath-planner/references/case/case-design-layers-guide.md +2 -2
- package/skills/uipath-planner/references/non-pdd-lane-guide.md +2 -1
- package/skills/uipath-planner/references/pdd-driven-lane-guide.md +3 -2
- package/skills/uipath-planner/references/sdd-generation-guide.md +1 -0
- package/skills/uipath-planner/scripts/case/audit_sdd.py +77 -1
- package/skills/uipath-platform/SKILL.md +6 -4
- package/skills/uipath-platform/references/integration-service/activities.md +7 -4
- package/skills/uipath-platform/references/integration-service/reference-resolution.md +28 -0
- package/skills/uipath-platform/references/integration-service/resources.md +11 -0
- package/skills/uipath-platform/references/integration-service/triggers.md +2 -2
- package/skills/uipath-platform/references/licensing/diagnose/CAPABILITY.md +80 -0
- package/skills/uipath-platform/references/licensing/diagnose/references/failure-modes.md +147 -0
- package/skills/uipath-platform/references/licensing/diagnose/references/troubleshooting-guide.md +125 -0
- package/skills/uipath-platform/references/licensing/licensing.md +3 -0
- package/skills/uipath-platform/references/licensing/user-licenses-allocations.md +5 -0
- package/skills/uipath-platform/references/orchestrator/run-jobs.md +11 -2
- package/skills/uipath-platform/references/traces/feedback.md +4 -4
- package/skills/uipath-platform/references/traces/traces.md +1 -1
- package/skills/uipath-process-mining/SKILL.md +6 -6
- package/skills/uipath-process-mining/references/lifecycle-and-rbac.md +10 -8
- package/skills/uipath-process-mining/references/model-editing.md +1 -1
- package/skills/uipath-process-mining/references/querying.md +4 -3
- package/skills/uipath-review/SKILL.md +171 -541
- package/skills/uipath-review/references/agents/agents-lowcode-rules.md +73 -92
- package/skills/uipath-review/references/agents/guardrails/coded-guardrails-review.md +4 -0
- package/skills/uipath-review/references/agents/guardrails/guardrails-review.md +73 -180
- package/skills/uipath-review/references/architecture-assessment-guide.md +93 -105
- package/skills/uipath-review/references/review-workflow-guide.md +1 -1
- package/skills/uipath-review/references/rpa/modern-studio-issues.md +44 -44
- package/skills/uipath-review/references/rpa/rpa-common-issues.md +251 -321
- package/skills/uipath-review/references/rpa/rpa-review-checklist.md +1 -1
- package/skills/uipath-review/references/rule-catalog-workflow.md +25 -45
- package/skills/uipath-review/references/rule-format.md +21 -21
- package/skills/uipath-rpa/.maintenance/pattern-card-maintenance.md +1 -1
- package/skills/uipath-rpa/CLAUDE.md +4 -5
- package/skills/uipath-rpa/SKILL.md +40 -246
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/FindText.md +2 -10
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/GetColorAtPosition.md +2 -10
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/GetCursorPosition.md +2 -10
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/GetField.md +13 -13
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/GetFieldAtPosition.md +2 -10
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/GetScreenArea.md +27 -8
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/GetText.md +2 -14
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/GetTextAtPosition.md +2 -10
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/MoveCursor.md +3 -11
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/MoveCursorToText.md +2 -10
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/SendControlKey.md +2 -8
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/SendKeys.md +2 -10
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/SendKeysSecure.md +2 -10
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/SetField.md +14 -13
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/SetFieldAtPosition.md +4 -7
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/TerminalSession/_common-options.md +29 -0
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/TerminalSession/authoring-paths.md +58 -0
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/TerminalSession.md +197 -11
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/WaitFieldText.md +2 -10
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/WaitScreenReady.md +9 -10
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/WaitScreenText.md +2 -14
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities/WaitTextAtPosition.md +2 -10
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/activities.json +271 -0
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/coded/coded-api.md +61 -3
- package/skills/uipath-rpa/references/activity-docs/UiPath.Terminal.Activities/2.10/overview.md +76 -0
- package/skills/uipath-rpa/references/cli-reference.md +63 -29
- package/skills/uipath-rpa/references/coded/codedworkflow-reference.md +59 -1
- package/skills/uipath-rpa/references/coded/operations-guide.md +2 -1
- package/skills/uipath-rpa/references/debugging.md +29 -12
- package/skills/uipath-rpa/references/environment-setup.md +54 -1
- package/skills/uipath-rpa/references/execution-maps-guide.md +10 -9
- package/skills/uipath-rpa/references/legacy/activity-docs/_INVOKE-CODE.md +1 -1
- package/skills/uipath-rpa/references/uia-starter-guide.md +46 -8
- package/skills/uipath-rpa/references/xaml/common-pitfalls.md +3 -4
- package/skills/uipath-rpa/references/xaml/csharp-activity-binding-guide.md +7 -8
- package/skills/uipath-rpa/references/xaml/xaml-basics-and-rules.md +132 -42
- package/skills/uipath-solution/SKILL.md +9 -6
- package/skills/uipath-solution/references/activate-and-manage.md +11 -6
- package/skills/uipath-solution/references/develop-solution.md +39 -28
- package/skills/uipath-solution/references/pack-and-deploy.md +49 -1
- package/skills/uipath-solution/references/scenarios/failure-modes.md +1 -1
- package/skills/uipath-solution/references/scenarios/intra-solution-references.md +3 -3
- package/skills/uipath-solution/references/scenarios/manual-edits.md +1 -1
- package/skills/uipath-solution/references/scenarios.md +2 -2
- package/skills/uipath-solution/references/solution-overview.md +15 -6
- package/skills/uipath-tasks/SKILL.md +11 -6
- package/skills/uipath-tasks/references/task-assignment.md +5 -0
- package/skills/uipath-tasks/references/task-catalogs.md +7 -4
- package/skills/uipath-tasks/references/task-completion.md +3 -1
- package/skills/uipath-tasks/references/task-data.md +3 -3
- package/skills/uipath-tasks/references/task-lifecycle.md +11 -0
- package/skills/uipath-tasks/references/task-metadata.md +4 -3
- package/skills/uipath-test/SKILL.md +13 -28
- package/skills/uipath-test/references/failure-triage-guide.md +90 -0
- package/skills/uipath-test/references/playwright-first-mile-guide.md +2 -2
- package/skills/uipath-test/references/publish-and-link-guide.md +0 -1
- package/skills/uipath-test/references/test-result-report-guide.md +1 -2
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/interpretations/healing-agent-data.md +1 -1
- package/skills/uipath-troubleshoot/references/presenting.md +1 -1
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/folder-not-accessible.md +1 -1
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/generic-error-400.md +4 -4
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/integration-service-400.md +2 -2
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/job-operation-timeout.md +1 -1
- package/skills/uipath-troubleshoot/references/products/maestro/playbooks/no-suitable-runtime-machine.md +1 -1
- package/version-manifest.json +2 -2
- package/skills/uipath-maestro-case/scripts/audit_plan.py +0 -231
- package/skills/uipath-maestro-flow/references/author/references/brownfield.md +0 -93
- package/skills/uipath-maestro-flow/references/author/references/editing-operations-json.md +0 -545
- package/skills/uipath-maestro-flow/references/author/references/editing-operations.md +0 -131
- package/skills/uipath-maestro-flow/references/author/references/planning-arch.md +0 -638
- package/skills/uipath-maestro-flow/references/author/references/planning-impl.md +0 -306
- package/skills/uipath-maestro-flow/references/author/references/plugins/agent/impl.md +0 -229
- package/skills/uipath-maestro-flow/references/author/references/plugins/batch-transform/impl.md +0 -174
- package/skills/uipath-maestro-flow/references/author/references/plugins/connector/impl.md +0 -741
- package/skills/uipath-maestro-flow/references/author/references/plugins/delay/impl.md +0 -75
- package/skills/uipath-maestro-flow/references/author/references/plugins/end/impl.md +0 -65
- package/skills/uipath-maestro-flow/references/author/references/plugins/hitl/impl.md +0 -204
- package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl-manual.md +0 -65
- package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl.md +0 -201
- package/skills/uipath-maestro-flow/references/author/references/plugins/merge/impl.md +0 -43
- package/skills/uipath-maestro-flow/references/author/references/plugins/merge/planning.md +0 -29
- package/skills/uipath-maestro-flow/references/author/references/plugins/rpa/impl.md +0 -121
- package/skills/uipath-maestro-flow/references/author/references/plugins/subflow/impl.md +0 -230
- package/skills/uipath-maestro-flow/references/author/references/plugins/summarize/impl.md +0 -198
- package/skills/uipath-maestro-flow/references/author/references/plugins/summarize/planning.md +0 -71
- package/skills/uipath-maestro-flow/references/author/references/plugins/switch/planning.md +0 -38
- package/skills/uipath-maestro-flow/references/author/references/plugins/terminate/impl.md +0 -48
- package/skills/uipath-maestro-flow/references/author/references/plugins/transform/impl.md +0 -287
- package/skills/uipath-maestro-flow/references/evaluate/references/eval-sets-guide.md +0 -226
- package/skills/uipath-maestro-flow/references/evaluate/references/upload-safety.md +0 -82
- package/skills/uipath-maestro-flow/references/operate/references/run.md +0 -99
- /package/skills/uipath-maestro-bpmn/references/diagnose/{references/failure-modes.md → failure-modes.md} +0 -0
- /package/skills/uipath-maestro-bpmn/references/operate/{references/manage.md → manage.md} +0 -0
- /package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/decision/planning.md +0 -0
- /package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/delay/planning.md +0 -0
- /package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/end/planning.md +0 -0
- /package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/flow/planning.md +0 -0
- /package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/ixp/planning.md +0 -0
- /package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/queue/impl.md +0 -0
- /package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/queue/planning.md +0 -0
- /package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/scheduled-trigger/planning.md +0 -0
- /package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/switch/impl.md +0 -0
- /package/skills/uipath-maestro-flow/references/author/{references/plugins → plugins}/terminate/planning.md +0 -0
- /package/skills/uipath-maestro-flow/references/evaluate/{references/evaluators-guide.md → evaluators-guide.md} +0 -0
- /package/skills/uipath-maestro-flow/references/evaluate/{references/running-guide.md → running-guide.md} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: uipath-api-workflow
|
|
3
|
-
description: "UiPath API Workflow assistant — author, run, validate, package, publish, deploy, and troubleshoot JSON workflows for `uip api-workflow`.
|
|
3
|
+
description: "UiPath API Workflow assistant — author, run, validate, package, publish, deploy, and troubleshoot JSON workflows for `uip api-workflow`. Load for ANY create/edit of a `Workflow.json` / API workflow project; with `evals/` present, tests come first (TDD). Covers Sequence, Assign, JavaScript, If (#Wrapper/#Then/#Else), ForEach, DoWhile, Break, TryCatch, Wait, Response, nested; files as JobAttachment refs via File to Base64 / Base64 to File (`$helpers.file.*`, `serializeData()`, `--input-file`/`--output-dir`); HTTP / IS connector activities via `uip api-workflow registry`. Operate: run, IS connections, pack/publish/deploy. Test/eval: `evals/<scope>/eval-sets/` datasets (exact-match, Evaluations panel); loop until green. Triggers on API workflows, project type \"Api\", JSON with `document.dsl`/`do[]`, those activity types, or file/base64 handling. Agent evals (`evals/eval-sets/`, no scope) & coded agents→uipath-agents. Flow & its evals→uipath-maestro-flow. .xaml/coded RPA→uipath-rpa. Coded Apps→uipath-coded-apps."
|
|
4
4
|
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,24 +8,30 @@ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
|
8
8
|
|
|
9
9
|
Build, run, and publish UiPath API Workflows — JSON files conforming to the CNCF Serverless Workflow DSL 1.0.0 with UiPath activity-type extensions. Executed by `@uipath/api-workflow-executor` via `uip api-workflow run`. Packaged as `Type: "Api"` projects via `uip solution pack`.
|
|
10
10
|
|
|
11
|
+
> **TDD gate — read this first (rule 22).** On ANY request to create or edit a workflow, Phase 0 first checks whether the project has an `evals/` folder — it lives **inside the project directory, next to `Workflow.json`** (`<project>/evals/`), not at the workspace or solution root, so list the project directory itself. **No `evals/` folder → the Evaluations feature is not enabled for this project: skip everything about tests and loop mode and author normally.** `evals/` present → **end your turn** with two questions — **(1) tests:** the eval set has rows → "should anything change, or use as-is?" / it is empty → "want me to add some?"; **(2) loop mode:** "run the tests and re-try until every case passes, or author once?" — and NOTHING is authored until the user answers. Tests come **first**: once answered, write or update the eval set, then author the workflow to make it pass. If you are about to write `Workflow.json` in a project with `evals/` and the user has not answered these two questions in this conversation, stop. Later change requests that alter behavior can break the tests — ask before editing whether to update them (rule 22, [references/testing-and-evals.md](references/testing-and-evals.md) §3). Only a prompt that explicitly says not to ask skips the gate when `evals/` exists — and that skips the questions, not the run consent (rule 21): run rows only when the request itself asks for a run.
|
|
12
|
+
|
|
11
13
|
## When to Use This Skill
|
|
12
14
|
|
|
13
15
|
- User wants to **create or edit** an API workflow JSON file
|
|
14
16
|
- User wants to **run** an API workflow locally with `uip api-workflow run`
|
|
15
17
|
- User wants to **package** an API workflow project into `.nupkg` / solution `.zip`
|
|
16
18
|
- User wants to **publish** an API workflow to UiPath Cloud / Orchestrator
|
|
17
|
-
- User asks about **activity types** (Sequence, Assign, JavaScript, If, ForEach, DoWhile, Break, TryCatch, Wait, Response, HTTP Request, Connector)
|
|
19
|
+
- User asks about **activity types** (Sequence, Assign, JavaScript, If, ForEach, DoWhile, Break, TryCatch, Wait, Response, File to Base64, Base64 to File, HTTP Request, Connector)
|
|
20
|
+
- User wants to **handle a file** in an API workflow — take a file input, send a file as base64 to an API, turn a base64 payload back into a file, or asks about `JobAttachment`, `$helpers.file`, `serializeData()`, `--input-file` / `--output-dir`. See [references/files-and-base64.md](references/files-and-base64.md)
|
|
18
21
|
- User asks about **nested control flow** — If inside ForEach, TryCatch around a loop, conditional Break, multi-way branching, etc.
|
|
19
22
|
- User asks for an **Integration Service connector activity** (Gmail Send Email, Outlook Get Newest Email, GitHub Search Issues, Slack Send Message, etc.) — follow the discovery flow in [references/connector-activity-discovery.md](references/connector-activity-discovery.md)
|
|
20
23
|
- User asks for a **generic HTTP Request** that needs to render in StudioWeb's designer — same discovery flow
|
|
21
24
|
- User asks about **JavaScript expressions, `$context`, `$input`, `$workflow`, `WorkflowStart`, or the `export.as` pattern**
|
|
22
25
|
- User asks how to **debug** a failing API workflow run — the local `validate` → `run --no-auth` loop, or a **post-publish cloud run** (job logs/traces). See [references/operating-published-workflows.md](references/operating-published-workflows.md)
|
|
23
26
|
- User wants to **operate** a published workflow — invoke it (HTTP/schedule/Integration Service event trigger), start/list/stop its Orchestrator jobs, or **manage the Integration Service connections** it uses (`uip is connections list`/`ping`/`edit`). See [references/operating-published-workflows.md](references/operating-published-workflows.md)
|
|
27
|
+
- User wants to **test / evaluate** a workflow — author `(inputs, expectedOutput)` cases in the project's `evals/` folder (the dataset Studio Web's **Evaluations** panel reads), run them, score them by the project's evaluator, or **"loop until the tests pass"**. Follow [references/testing-and-evals.md](references/testing-and-evals.md). An `evals/` folder alone is not the signal — it is an API-workflow one only when it sits next to `Workflow.json` and uses the `evals/<scope>/eval-sets/` layout; low-code agents use `evals/eval-sets/` (no scope) → `uipath-agents`, Flow evals → `uipath-maestro-flow`
|
|
28
|
+
- **Any authoring request** (create or edit) — Phase 0 discovery checks for an `evals/` folder; when it exists, the two test questions (change / add tests? loop mode?) are asked up front — the turn ends there — whether or not the user mentioned testing (rule 22). No `evals/` folder → the feature is off, author normally. See Phase 0 and [references/testing-and-evals.md](references/testing-and-evals.md)
|
|
24
29
|
|
|
25
30
|
Do NOT use for: `.flow` Maestro flows (→ `uipath-maestro-flow`), `.xaml` / coded RPA (→ `uipath-rpa`), coded agents (→ `uipath-agents`), Coded Web Apps (→ `uipath-coded-apps`).
|
|
26
31
|
|
|
27
32
|
## Core Principles
|
|
28
33
|
|
|
34
|
+
0. **Tests first — when the project has `evals/`, and only after asking.** Discover `<project>/evals/` (next to `Workflow.json`). Absent → the Evaluations feature is off for this project: author normally, no test or loop-mode questions. Present → ask the two rule-22 questions, end the turn; once answered: declare `output.schema`, eval set first, workflow second, then run the rows **only in loop mode** (that "yes" is the rule-21 consent; "author once" means hand over without running). Behavior changes later on re-open the question — the tests may need updating.
|
|
29
35
|
1. **Know before you write.** Read the existing workflow file before editing. Read an example template before creating from scratch.
|
|
30
36
|
2. **Start minimal, iterate to correct.** Add one activity at a time. Run with `--no-auth --output json` after each addition. Fix what breaks. Repeat.
|
|
31
37
|
3. **Validate before running.** `uip api-workflow validate` is the offline static pre-flight (autonomous); `uip api-workflow run` is the runtime validator that catches what static analysis can't (live HTTP, expression evaluation, connection state) and needs user consent. See rules 20–21.
|
|
@@ -97,13 +103,32 @@ Do NOT use for: `.flow` Maestro flows (→ `uipath-maestro-flow`), `.xaml` / cod
|
|
|
97
103
|
|
|
98
104
|
**What validate catches:** malformed JSON; unknown `activityType` values (see VALID_ACTIVITY_TYPES list in the validate source); per-activity required keys (If → `do` + inner `switch`, Sequence → `do`, Assign → `set`, ForEach → `for` + `do`, DoWhile → `for` + `doWhile`, Connector → `call` + `metadata.configuration` + `essentialConfiguration`, Response → `response`, etc.); missing `metadata.activityType`/`displayName` (warnings); bad `evaluate.language`/`evaluate.mode`; duplicate or empty-named workflow variables; empty task lists. **What it does NOT catch:** wrong `selectedResourceId`, broken connector connection IDs, runtime expression errors (`ReferenceError: x is not defined`), unwrapped string literals (rule 5), multi-key `Assign.set` (rule 6) — those still need runtime validation via `uip api-workflow run` once the user consents.
|
|
99
105
|
|
|
100
|
-
21. **Never run `uip api-workflow run` without an explicit user "yes."** Validation (rule 20) is autonomous; *running* is not. Once validate passes, ask the user: (a) run now or skip, (b) if running, with `--no-auth` (fast, structure-only — IntSvc kind vendor calls fail) or with auth (real Integration Service calls — vendor side effects WILL happen: emails sent, tickets created, files uploaded). Suggest a default based on workflow content (`--no-auth` for control-flow-only + Http kind `ImplicitConnection`; with-auth for any IntSvc kind vendor activity), but wait for the user's answer. Never invoke `uip api-workflow run` with auth on speculation — once a vendor call goes out, it can't be unsent.
|
|
106
|
+
21. **Never run `uip api-workflow run` without an explicit user "yes."** Validation (rule 20) is autonomous; *running* is not. Once validate passes, ask the user: (a) run now or skip, (b) if running, with `--no-auth` (fast, structure-only — IntSvc kind vendor calls fail) or with auth (real Integration Service calls — vendor side effects WILL happen: emails sent, tickets created, files uploaded). Suggest a default based on workflow content (`--no-auth` for control-flow-only + Http kind `ImplicitConnection`; with-auth for any IntSvc kind vendor activity), but wait for the user's answer. Never invoke `uip api-workflow run` with auth on speculation — once a vendor call goes out, it can't be unsent. This rule gates only `uip api-workflow run`. If the user asked to package or publish, do not stop on the run question: validate, then pack (rule 19). A local run is a separate request; do it only when the user asks for it.
|
|
107
|
+
|
|
108
|
+
22. **TDD gate — only for projects with an `evals/` folder; STOP and ask before authoring; tests are written before the workflow.** Every authoring request (create OR edit — including a one-line change) runs Phase-0 discovery of the project's `evals/` folder — `<project>/evals/`, the directory next to `Workflow.json` (list that directory; the workspace or solution root is the wrong place to look):
|
|
109
|
+
- **No `evals/` folder** → the Evaluations feature is not enabled for this project. Skip the gate entirely: do not offer to create tests, do not mention loop mode, do not create the folder — author normally (Phases 1–3).
|
|
110
|
+
- **`evals/` present** → **end the turn** with two questions. Do not write or edit `Workflow.json`, and do not create or change eval files, until the user has answered both:
|
|
111
|
+
1. **Tests** — the eval set has rows → *"I found N test case(s): [one line each]. Should anything change, or use them as-is?"*; the set is empty (the panel seeds one with 0 rows) → *"There are no test cases yet — want me to add some? I'd suggest: [2–3 proposed cases]."*
|
|
112
|
+
2. **Loop mode** — *"Run in loop mode (run the tests and re-try — fix, re-run — until every case passes), or author once and you verify?"* A "yes" to loop mode is also the consent to run the rows with `--no-auth` (rule 21) — do not ask "run now?" separately; connector/authed runs still need their own explicit "yes".
|
|
113
|
+
|
|
114
|
+
**Order after the answers (TDD):** first declare `input.schema` / `output.schema` in `Workflow.json` (`init` scaffolds `output: null`, so the row keys have no other source — property names and casing come from here, and the Response must emit exactly those keys), then write or update the eval set, then author the workflow, then run the rows (loop mode) or hand over (author once — do not run). **Later change requests that alter behavior** (threshold, rounding, branch order, a new default — even with the schema unchanged) can make existing expectations wrong: before editing, list the affected rows and ask whether to update them; after editing, re-run the rows. Ask as two specific questions — never one vague "how do you want to verify it?". With `evals/` present, the gate is skipped only when the user already answered, or explicitly asked not to be prompted ("don't ask for confirmation"); then keep existing tests as-is and add tests only if requested. "Don't ask" waives the two questions, **not** rule 21's run consent: run the rows only if the request itself asks for a run or a loop ("run the evaluations", "until they pass" — that wording is the consent); otherwise author once and hand over the exact command to run them. Protocol and wording: [references/testing-and-evals.md](references/testing-and-evals.md) §3.
|
|
115
|
+
|
|
116
|
+
23. **Files are references, not bytes — and base64 is a file too.** A file input or output is a `JobAttachment` (`{ ID, FullName, MimeType, Metadata? }`) pointing at a blob in Orchestrator storage; `$workflow.input.<file>` is that object, never the bytes.
|
|
117
|
+
- **The two activities.** Both are `run.script` tasks; the `$helpers.file.*` call in the script is what identifies them (it is what `validate` checks). **File to Base64** (`metadata.activityType: "FileToBase64"`, code `return { output: await $helpers.file.fileToBase64(<file ref>) }`) returns a NEW reference whose blob content IS the base64 text (`<name>.base64`, `text/plain`, `Metadata.Encoding: "base64"`). **Base64 to File** (`metadata.activityType: "Base64ToFile"`, code `return { output: await $helpers.file.base64ToFile({ base64: <ref or string>, fileName?, mimeType? }) }`) returns a binary reference. The script is that single `return` expression and nothing else: Studio Web rebuilds the script from the parsed call on every designer save and silently drops a preceding or trailing statement, a second argument, or an extra option key. `validate` warns only about the extra statements — an extra argument passes as `Valid` and still breaks — so put any pre-processing in a JavaScript activity before the conversion.
|
|
118
|
+
- **Reading results.** Read either activity's result as `$context.outputs.<Key>.output`.
|
|
119
|
+
- **Inlining file content.** To put a file's content INLINE in an HTTP request body or a Response field, call `<ref>.serializeData()` right there — it returns a deferred-read marker the engine fills at send time; never store it in a variable or use it in script logic. Nested in a JSON body it works **only for a base64 reference** (the File to Base64 output): a binary file's marker, or a bare reference, nested in a body is a send-time error — send a binary file as the *whole* body (bare reference) or convert it first.
|
|
120
|
+
- **Naming.** `fileName` / `mimeType` apply only to a raw base64 *string*; a reference keeps its own name and the engine sniffs the type from bytes (a `.txt` round-trips to an extension-less file).
|
|
121
|
+
- **Running.** Both helpers need Orchestrator blob storage:
|
|
122
|
+
`uip api-workflow run --no-auth` refuses such a workflow up front; run it signed in (`uip login`, no `--no-auth`) — it still needs the rule-21 "yes". Pass local files with `--input-file <name>=<path>` (uploaded, arriving as `$workflow.input.<name>`), collect returned files with `--output-dir <dir>` (each reference in the output gains a `LocalPath`), and `--folder-key <guid>` if the tenant's Attachments API requires a folder. In the printed output the CLI PascalCases keys (`ID` → `Id`).
|
|
123
|
+
Shapes, worked example and pitfalls: [references/files-and-base64.md](references/files-and-base64.md).
|
|
101
124
|
|
|
102
125
|
## Workflow Phases
|
|
103
126
|
|
|
104
127
|
### Phase 0: Discovery
|
|
105
128
|
|
|
106
|
-
Before touching anything, understand what exists.
|
|
129
|
+
Before touching anything, understand what exists — the workflow structure **and** whether the project has tests. Discovery ALWAYS includes checking for an `evals/` folder inside the project directory (`ls <project>/` — the folder is a sibling of `Workflow.json`, never at the workspace/solution root): Studio Web creates it when the Evaluations feature is enabled and the panel is opened, so its absence means the feature is off for this project. If present, read `evals/<scope>/eval-sets/*.json` (`<scope>` is `default` unless the project says otherwise) and the evaluator(s) in `evals/<scope>/evaluators/` — the same files the **Evaluations** panel reads and writes. Contract and semantics: [references/testing-and-evals.md](references/testing-and-evals.md) §1.
|
|
130
|
+
|
|
131
|
+
Then apply **rule 22 (TDD gate)**: no `evals/` folder → the feature is off, continue to Phase 1 without any test or loop-mode question; `evals/` present → end the turn with the two questions — tests (change / add?) and loop mode — and start Phase 1 only after the user has answered, writing the eval set before the workflow.
|
|
107
132
|
|
|
108
133
|
For **edit** requests:
|
|
109
134
|
1. Read the existing workflow file with `Read`
|
|
@@ -135,6 +160,8 @@ Decide which activities to use and in what order.
|
|
|
135
160
|
| Handle errors (skip & continue) | **TryCatch inside body** | One bad item skipped, loop continues — see [control-flow-patterns.md](references/control-flow-patterns.md#7-trycatch-inside-a-loop-body-skip-and-continue-error-handling) |
|
|
136
161
|
| Return result and end | **Response** | `then: "end"`; `markJobAsFailed` sibling of `response` |
|
|
137
162
|
| Pause execution | **Wait** | `wait.seconds`/`minutes`/`milliseconds` |
|
|
163
|
+
| Encode a file (input or downloaded) as base64 for an API that wants inline base64 | **File to Base64** (`FileToBase64`) | `run.script` calling `await $helpers.file.fileToBase64(<ref>)`; output is a base64 FILE reference — inline it in the body with `.serializeData()`. Rule 23. |
|
|
164
|
+
| Turn a base64 payload (API response string or a base64 file) back into a file | **Base64 to File** (`Base64ToFile`) | `run.script` calling `await $helpers.file.base64ToFile({ base64, fileName?, mimeType? })`; output is a binary file reference. Rule 23. |
|
|
138
165
|
| Exit loop early | **Break (in If)** | Wrap Break in an If — there's no "break when" condition on Break itself. `break: "true"` (string!), `then: "exit"`, `set: "${$input}"` |
|
|
139
166
|
| Exit nested loops | **Flag variable + Break twice** | Set a flag in inner loop, check + Break in outer — see [control-flow-patterns.md](references/control-flow-patterns.md#5-conditional-break-inside-a-loop) |
|
|
140
167
|
| Call an arbitrary REST API (catfacts, stock prices, weather, any public/internal endpoint) | **Unified HTTP Request** (`call: "UiPath.Http"`, Http kind) | `connectionId: "ImplicitConnection"`. NEVER `call: "http"` (block icon). Via rule 16's flow. |
|
|
@@ -149,12 +176,16 @@ Before generating, determine:
|
|
|
149
176
|
|
|
150
177
|
### Phase 2: Generate or Edit
|
|
151
178
|
|
|
179
|
+
**Precondition (projects with `evals/`):** the two rule-22 questions have been answered in this conversation and the eval set (if wanted) is already written. If not, go back to Phase 0 and ask — do not write `Workflow.json` yet. Projects without `evals/` have no such gate.
|
|
180
|
+
|
|
152
181
|
For each activity, read its reference section in [references/task-types.md](references/task-types.md), copy the minimal JSON, fill in values.
|
|
153
182
|
|
|
154
183
|
**For CREATE:** copy from a template, then add user activities AFTER `WorkflowStart` inside the root sequence (literally `Sequence_1.do` in the template skeleton).
|
|
155
184
|
|
|
156
185
|
**For EDIT:** read the file first, identify the exact insertion / replacement point, use `Edit` with sufficient context for unique matching.
|
|
157
186
|
|
|
187
|
+
If the edit **changes behavior** and the project has an eval set, rule 22 applies first: ask whether to update the expectations the change would invalidate, then edit, then re-run the rows (see [references/testing-and-evals.md](references/testing-and-evals.md) §3 step 5).
|
|
188
|
+
|
|
158
189
|
Workflow skeleton:
|
|
159
190
|
```json
|
|
160
191
|
{
|
|
@@ -187,7 +218,7 @@ Fix run failures in category order — **Structure > Expression > Activity Confi
|
|
|
187
218
|
|
|
188
219
|
### Phase 4: Package, Publish, and Operate
|
|
189
220
|
|
|
190
|
-
|
|
221
|
+
Packaging needs a passing `validate` (rule 20), not a local run. When the request is to build, package, or publish, pack right away; rule 21 gates `uip api-workflow run`, never `uip solution pack`. Deploy via the solution packager. If the project must open in Studio Web, confirm it uses the `init`-produced shape first (rule 19a); runtime/pack success does not prove it.
|
|
191
222
|
|
|
192
223
|
**Pack:**
|
|
193
224
|
```bash
|
|
@@ -223,6 +254,10 @@ uip solution init MySolution --output json
|
|
|
223
254
|
cd ./MySolution
|
|
224
255
|
uip api-workflow init MyApiProject --output json
|
|
225
256
|
|
|
257
|
+
# 1b. TDD gate (rule 22): if ./MyApiProject/evals/ exists (next to Workflow.json), STOP and ask the two questions
|
|
258
|
+
# (tests: change / add? loop mode?) and wait for the answers before step 2.
|
|
259
|
+
# No evals/ folder → the feature is off for this project; go straight to step 2.
|
|
260
|
+
|
|
226
261
|
# 2. Edit MyApiProject/Workflow.json to add user activities after WorkflowStart inside the root sequence
|
|
227
262
|
|
|
228
263
|
# 3. Validate (offline, autonomous — fix + re-validate until Status: Valid)
|
|
@@ -249,9 +284,11 @@ uip solution publish ./build/MyApiSolution_1.0.0.zip --tenant MyTenant --output
|
|
|
249
284
|
| [references/control-flow-patterns.md](references/control-flow-patterns.md) | Combining activities into hierarchical structures — nested If, ForEach inside DoWhile, TryCatch around/inside loops, conditional Break, multi-way branching, key uniqueness rules |
|
|
250
285
|
| [references/connector-activity-discovery.md](references/connector-activity-discovery.md) | Authoring HTTP Request / Gmail / Outlook / GitHub / Slack / etc. activities via `uip api-workflow registry resolve` + `stub` — three-step flow, sample stub output, field-shape rules, multipart subsection, worked examples |
|
|
251
286
|
| [references/expressions-and-context.md](references/expressions-and-context.md) | Writing JS expressions, propagating outputs via `export.as`, accessing `$context` / `$input` / `$workflow`, JS_Invoke argument passing, strict-mode gotchas, key patterns |
|
|
287
|
+
| [references/files-and-base64.md](references/files-and-base64.md) | **Files & base64** — `JobAttachment` references, the File to Base64 / Base64 to File activities (exact JSON, `$helpers.file.*`), `serializeData()` for inline bodies/Responses, passing local files in and getting files out of a run, pitfalls |
|
|
252
288
|
| [references/cli-reference.md](references/cli-reference.md) | All `uip` commands — `api-workflow init`, `run`, `build`, `pack`, `validate`, `solution init`, `solution pack`, `solution publish`, `login` |
|
|
253
|
-
| [references/operating-published-workflows.md](references/operating-published-workflows.md) | **Operating + diagnosing a published workflow** — invoke via HTTP/schedule/event triggers, manage Integration Service connections (`uip is connections`), start/list/stop Orchestrator jobs (`uip or jobs`),
|
|
289
|
+
| [references/operating-published-workflows.md](references/operating-published-workflows.md) | **Operating + diagnosing a published workflow** — invoke via HTTP/schedule/event triggers, manage Integration Service connections (`uip is connections`), start/list/stop Orchestrator jobs (`uip or jobs`), diagnose a faulted cloud run (`uip or jobs get` — `jobs logs` and `traces spans get` are dead ends here). Delegates depth to `uipath-platform` / `uipath-troubleshoot` |
|
|
254
290
|
| [references/troubleshooting.md](references/troubleshooting.md) | Failed runs, structure/expression/loop/nesting/response/validation pitfalls, packaging errors, publish errors, debugging strategy |
|
|
291
|
+
| [references/testing-and-evals.md](references/testing-and-evals.md) | **Testing / evals** — the `evals/<scope>/eval-sets` + `evaluators` file contract shared with Studio Web's Evaluations panel, `uipath-exact-match` scoring (strict deep-equal on the RAW output — the CLI PascalCases printed keys), running a row locally with `--no-auth` (or through the host in Studio Web), and the **interactive test-until-green loop** (offer → check `evals/` → create/update cases → run/fix/repeat with progress → stale-expectation guard) |
|
|
255
292
|
|
|
256
293
|
|
|
257
294
|
## Templates
|
|
@@ -262,6 +299,7 @@ uip solution publish ./build/MyApiSolution_1.0.0.zip --tenant MyTenant --output
|
|
|
262
299
|
| [assets/templates/conditional-workflow-example.json](assets/templates/conditional-workflow-example.json) | If branching with TryCatch — input validation + classification + error fallback |
|
|
263
300
|
| [assets/templates/loop-aggregation-example.json](assets/templates/loop-aggregation-example.json) | DoWhile + ForEach + Assign accumulation — pure-compute aggregation pattern |
|
|
264
301
|
| [assets/templates/nested-control-flow-example.json](assets/templates/nested-control-flow-example.json) | Heavy nesting demo — TryCatch around DoWhile around If with conditional Break |
|
|
302
|
+
| [assets/templates/file-base64-roundtrip-example.json](assets/templates/file-base64-roundtrip-example.json) | **Files** — a `document` file input → File to Base64 → Base64 to File → Response returning both references. The exact `run.script` shape Studio Web writes for the two activities (rule 23). Verified end-to-end with a signed-in run: local file in → `.base64` reference → decoded file out, bytes identical. |
|
|
265
303
|
| [assets/templates/connector-call-example.json](assets/templates/connector-call-example.json) | **Http kind** — HTTP Request curated activity (`call: "UiPath.Http"`) for arbitrary REST calls. Generated by `registry stub` against the catfacts URL. Shows the canonical shape: `connectionId: "ImplicitConnection"`, `unifiedTypesCompatible: true`, `savedJitInputFieldId: "in_http-request"`, URL in `bodyParameters.url`. Verified end-to-end with `uip api-workflow run --no-auth`. |
|
|
266
304
|
| [assets/templates/vendor-curated-call-example.json](assets/templates/vendor-curated-call-example.json) | **IntSvc kind** — vendor curated activity (`call: "UiPath.IntSvc"`) using Outlook GetNewestEmail as exemplar. The `<REPLACE_WITH_VENDOR_CONNECTION_UUID>` placeholder is a sentinel — replace it with a pinged UUID from `uip is connections list/ping` **before** writing the workflow to disk. StudioWeb renders the literal placeholder as a broken connection if it survives. See rule 16. |
|
|
267
305
|
| [assets/templates/solution-connection-resource-template.json](assets/templates/solution-connection-resource-template.json) | **Solution connection resource** — declares a IntSvc kind connection as a Solution resource. Write to `Solution/resources/solution_folder/connection/<connector-key>/<connection-name>.json`. Required for Solutions-mode projects; without it the StudioWeb properties panel flags the activity as having an invalid connection. |
|
|
@@ -274,11 +312,15 @@ The mistakes an agent makes most often (each maps to a Critical Rule above — s
|
|
|
274
312
|
- **Do NOT** wrap connector `bodyParameters` / `queryParameters` literals as `${'literal'}` — rule 5's wrap is **inverted** for connectors; bare literals only, or the field clears on save. See rule 16.
|
|
275
313
|
- **Do NOT** ship a `<REPLACE_WITH_*>` placeholder in a workflow — StudioWeb renders it as a broken connection and it 401s. No pinged UUID → ask the user. See rule 16.
|
|
276
314
|
- **Do NOT** read workflow inputs as `$input.<name>` from a non-first activity — use `$workflow.input.<name>`. See rule 13.
|
|
315
|
+
- **Do NOT** treat a file input or a File to Base64 result as a string — both are `JobAttachment` references. Inline a file's content only with `<ref>.serializeData()` inside an HTTP body / Response, never in an Assign or script — and inside a JSON body field only on the File to Base64 output (`$workflow.input.document.serializeData()` nested in a body fails with "Raw bytes cannot be embedded in JSON"). See rule 23.
|
|
316
|
+
- **Do NOT** write `$helpers.fileToBase64(...)` / `$helpers.base64ToFile(...)` — the helpers live under `$helpers.file.`; `validate` rejects the task and the runtime says `is not a function`. See rule 23.
|
|
277
317
|
- **Do NOT** invoke `uip api-workflow run` autonomously, and never with auth without an explicit "yes" — vendor calls have irreversible side effects (emails sent, tickets created). See rules 20–21.
|
|
278
318
|
- **Do NOT** hand-assemble a project (`project.json` + `main.json`/`workflows/WF_*.json`). Scaffold with `uip api-workflow init <name>` — it writes the correct `project.uiproj` shape and registers it in the `.uipx`. The legacy `project.json`-only shape runs and packs but Studio Web rejects it (`invalid_project_folder`) and never shows it. See rules 19–19a.
|
|
279
319
|
- **Do NOT** emit a lone `Workflow.json` with no project files, even for a quick local run. It runs under `uip api-workflow run` but is not a Studio Web project — can't be edited or shipped. Every workflow lives in an `init`-scaffolded project (`--skip-solution-registration` when no solution is needed). See rule 19a ("Which mode").
|
|
280
320
|
- **Do NOT** wire a project into the solution with `uip solution projects add/remove` — it errors on an already-registered name, and `remove`+`add` destroys the project `Id`. `init` registers it; for an already-built project, edit the `.uipx` `ProjectRelativePath` in place. See rule 19a.
|
|
281
321
|
- **Do NOT** trust "it packed / published / ran" as proof a project opens in Studio Web — every runtime gate passes on the wrong shape. Scaffolding with `init` is what guarantees it (rule 19a).
|
|
322
|
+
- **Do NOT** copy expected outputs from the CLI's printed `Data` — `uip` PascalCases every key (`grade` → `Grade`) and `uipath-exact-match` is case-sensitive on keys, so the row passes for you and fails in the Evaluations panel. Derive keys from `output.schema` / the Response expression and read the raw output from the debug log. See [references/testing-and-evals.md](references/testing-and-evals.md) §2.
|
|
323
|
+
- **Do NOT** author first and ask later in a project that has `evals/`: rule 22 ends the turn with the two test questions (change / add tests? loop mode?) BEFORE any `Workflow.json` or eval file is written, unless the user already answered or asked not to be prompted. **Do NOT** offer tests or loop mode — or create an `evals/` folder — in a project that has none: the feature is not enabled there. And **do NOT** "fix" the workflow to satisfy an expectation a requested behavior change made stale — re-derive the expected outputs instead, after asking. See rule 22 + [references/testing-and-evals.md](references/testing-and-evals.md) §3–4.
|
|
282
324
|
|
|
283
325
|
## Infinite Loop Prevention
|
|
284
326
|
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
{
|
|
2
|
+
"document": {
|
|
3
|
+
"dsl": "1.0.0",
|
|
4
|
+
"namespace": "default",
|
|
5
|
+
"name": "file-base64-roundtrip",
|
|
6
|
+
"version": "0.0.1",
|
|
7
|
+
"metadata": {
|
|
8
|
+
"variables": {
|
|
9
|
+
"schema": {
|
|
10
|
+
"format": "json",
|
|
11
|
+
"document": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {},
|
|
14
|
+
"title": "Variables"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"evaluate": {
|
|
21
|
+
"language": "javascript",
|
|
22
|
+
"mode": "strict"
|
|
23
|
+
},
|
|
24
|
+
"input": {
|
|
25
|
+
"schema": {
|
|
26
|
+
"format": "json",
|
|
27
|
+
"document": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": {
|
|
30
|
+
"document": {
|
|
31
|
+
"$ref": "#/definitions/job-attachment",
|
|
32
|
+
"description": "The file to encode (a JobAttachment reference)."
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": ["document"],
|
|
36
|
+
"definitions": {
|
|
37
|
+
"job-attachment": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"properties": {
|
|
40
|
+
"ID": { "type": "string", "description": "Orchestrator attachment key" },
|
|
41
|
+
"FullName": { "type": "string" },
|
|
42
|
+
"MimeType": { "type": "string" },
|
|
43
|
+
"Metadata": { "type": "object" }
|
|
44
|
+
},
|
|
45
|
+
"required": ["ID"],
|
|
46
|
+
"x-uipath-resource-kind": "JobAttachment"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"output": {
|
|
53
|
+
"schema": {
|
|
54
|
+
"format": "json",
|
|
55
|
+
"document": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"properties": {
|
|
58
|
+
"encoded": { "$ref": "#/definitions/job-attachment" },
|
|
59
|
+
"decoded": { "$ref": "#/definitions/job-attachment" },
|
|
60
|
+
"encodedName": { "type": "string" },
|
|
61
|
+
"decodedName": { "type": "string" }
|
|
62
|
+
},
|
|
63
|
+
"definitions": {
|
|
64
|
+
"job-attachment": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"ID": { "type": "string", "description": "Orchestrator attachment key" },
|
|
68
|
+
"FullName": { "type": "string" },
|
|
69
|
+
"MimeType": { "type": "string" },
|
|
70
|
+
"Metadata": { "type": "object" }
|
|
71
|
+
},
|
|
72
|
+
"required": ["ID"],
|
|
73
|
+
"x-uipath-resource-kind": "JobAttachment"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"do": [
|
|
80
|
+
{
|
|
81
|
+
"Sequence_1": {
|
|
82
|
+
"do": [
|
|
83
|
+
{
|
|
84
|
+
"WorkflowStart": {
|
|
85
|
+
"set": "${Object.entries($workflow.definition?.document?.metadata?.variables?.schema?.document?.properties || {}).reduce((acc, [name, def]) => ({ ...acc, [name]: def?.default }), {}) }",
|
|
86
|
+
"output": { "as": "${$input}" },
|
|
87
|
+
"export": { "as": "{ ...$context, variables: { ...$context.variables, ...$output } }" },
|
|
88
|
+
"metadata": {
|
|
89
|
+
"activityType": "Assign",
|
|
90
|
+
"displayName": "Workflow start",
|
|
91
|
+
"fullName": "Assign",
|
|
92
|
+
"isTransparent": true
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"FileToBase64_1": {
|
|
98
|
+
"run": {
|
|
99
|
+
"script": {
|
|
100
|
+
"code": "return { output: await $helpers.file.fileToBase64($workflow.input.document) }",
|
|
101
|
+
"language": "javascript",
|
|
102
|
+
"arguments": "${{ \"$context\": $context, \"$workflow\": $workflow, \"$input\": $input }}"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"export": { "as": "{ ...$context, outputs: { ...$context?.outputs, \"FileToBase64_1\": $output } }" },
|
|
106
|
+
"metadata": {
|
|
107
|
+
"activityType": "FileToBase64",
|
|
108
|
+
"displayName": "File to Base64",
|
|
109
|
+
"fullName": "FileToBase64",
|
|
110
|
+
"icon": "sw:convert-file-to-base64"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"Base64ToFile_1": {
|
|
116
|
+
"run": {
|
|
117
|
+
"script": {
|
|
118
|
+
"code": "return { output: await $helpers.file.base64ToFile({ base64: $context.outputs.FileToBase64_1.output }) }",
|
|
119
|
+
"language": "javascript",
|
|
120
|
+
"arguments": "${{ \"$context\": $context, \"$workflow\": $workflow, \"$input\": $input }}"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"export": { "as": "{ ...$context, outputs: { ...$context?.outputs, \"Base64ToFile_1\": $output } }" },
|
|
124
|
+
"metadata": {
|
|
125
|
+
"activityType": "Base64ToFile",
|
|
126
|
+
"displayName": "Base64 to File",
|
|
127
|
+
"fullName": "Base64ToFile",
|
|
128
|
+
"icon": "sw:convert-base64-to-file"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"Response_1": {
|
|
134
|
+
"response": "${{ encoded: $context.outputs.FileToBase64_1.output, decoded: $context.outputs.Base64ToFile_1.output, encodedName: $context.outputs.FileToBase64_1.output.FullName, decodedName: $context.outputs.Base64ToFile_1.output.FullName }}",
|
|
135
|
+
"markJobAsFailed": false,
|
|
136
|
+
"then": "end",
|
|
137
|
+
"export": { "as": "{ ...$context, outputs: { ...$context?.outputs, \"Response_1\": $output } }" },
|
|
138
|
+
"metadata": {
|
|
139
|
+
"activityType": "Response",
|
|
140
|
+
"displayName": "Response",
|
|
141
|
+
"fullName": "Response"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"metadata": {
|
|
147
|
+
"activityType": "Sequence",
|
|
148
|
+
"displayName": "Sequence",
|
|
149
|
+
"fullName": "Sequence"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
@@ -91,6 +91,9 @@ Execute an API workflow JSON file locally using the Serverless Workflow executor
|
|
|
91
91
|
```bash
|
|
92
92
|
uip api-workflow run <file> \
|
|
93
93
|
[--input-arguments <json>] \
|
|
94
|
+
[--input-file <name>=<path>]... \
|
|
95
|
+
[--output-dir <dir>] \
|
|
96
|
+
[--folder-key <guid>] \
|
|
94
97
|
[--no-auth] \
|
|
95
98
|
[--output json]
|
|
96
99
|
```
|
|
@@ -99,7 +102,10 @@ uip api-workflow run <file> \
|
|
|
99
102
|
|-----------------|----------|-------------|
|
|
100
103
|
| `<file>` | yes | Path to the workflow JSON file. |
|
|
101
104
|
| `-i, --input-arguments <json>` | no | Input arguments as a JSON string (e.g., `'{"name":"World"}'`). Invalid JSON exits 1. |
|
|
102
|
-
| `--
|
|
105
|
+
| `--input-file <name>=<path>` | no (repeatable) | Upload a local file to Orchestrator blob storage and pass the resulting `JobAttachment` reference as input `<name>` — the same object Studio Web's run panel produces, read as `$workflow.input.<name>`. MIME type from the extension. Needs a signed-in session; refused with `--no-auth`. |
|
|
106
|
+
| `--output-dir <dir>` | no | After a successful run, download every `JobAttachment` reference found in the output into `<dir>`; each downloaded reference in the printed `Data` gains a `LocalPath`. Same-named blobs get an `-<Id>` suffix. Needs a signed-in session. |
|
|
107
|
+
| `--folder-key <guid>` | no | Orchestrator folder key for the attachments the run creates (uploaded inputs and the files written by File to Base64 / Base64 to File). Pass it when the tenant's Attachments API rejects folder-less requests. |
|
|
108
|
+
| `--no-auth` | no | Skip credential loading. Use for workflows that don't need Orchestrator/IS auth — control-flow-only workflows, or Http kind activities using `connectionId: "ImplicitConnection"`. IntSvc kind (vendor connector) activities always need auth at run time, and so do file features: a workflow calling `$helpers.file.*` (File to Base64 / Base64 to File) is refused up front under `--no-auth`, as are `--input-file` / `--output-dir`. |
|
|
103
109
|
| `--output json` | no | Emit machine-readable JSON. Strongly recommended when output is parsed. |
|
|
104
110
|
|
|
105
111
|
### Success output
|
|
@@ -131,6 +137,11 @@ Exit code: `1`. Common `Message` values:
|
|
|
131
137
|
- `"Invalid JSON in workflow file"`
|
|
132
138
|
- `"Invalid JSON in --input-arguments"`
|
|
133
139
|
- `"<task error>"` (executor-level failure)
|
|
140
|
+
- `"Invalid --input-file value '<value>'. Expected <name>=<path> …"`
|
|
141
|
+
- `"--input-file needs a signed-in session …"` / `"--output-dir needs a signed-in session …"` (used with `--no-auth`)
|
|
142
|
+
- `"This workflow uses the file helpers ($helpers.file.fileToBase64 / $helpers.file.base64ToFile …) … cannot run with --no-auth"`
|
|
143
|
+
- `"Input file for '<name>' not found: <path>"` / `"Failed to upload input file '<name>' (<file>): …"`
|
|
144
|
+
- `"The workflow completed, but downloading its output files to <dir> failed: …"` (the run succeeded; its output — with the attachment IDs — is still printed under `Data`)
|
|
134
145
|
|
|
135
146
|
### Examples
|
|
136
147
|
|
|
@@ -142,6 +153,14 @@ uip api-workflow run ./hello.json --no-auth --output json
|
|
|
142
153
|
uip api-workflow run ./greet.json \
|
|
143
154
|
--input-arguments '{"name":"Alice","count":3}' \
|
|
144
155
|
--output json
|
|
156
|
+
|
|
157
|
+
# With a file input and file outputs (needs `uip login`; no --no-auth)
|
|
158
|
+
uip api-workflow run ./MyApiProject/Workflow.json \
|
|
159
|
+
--input-file document=./invoice.pdf \
|
|
160
|
+
--output-dir ./out \
|
|
161
|
+
--output json
|
|
162
|
+
# → Data.<Key> = { "Id": "...", "FullName": "invoice.base64", "MimeType": "text/plain",
|
|
163
|
+
# "Metadata": { "Size": 1234, "Encoding": "base64" }, "LocalPath": "/abs/out/invoice.base64" }
|
|
145
164
|
```
|
|
146
165
|
|
|
147
166
|
## `uip api-workflow registry`
|
|
@@ -11,6 +11,7 @@ API workflows use **JavaScript** for all expressions (`evaluate.language: "javas
|
|
|
11
11
|
| `$input` | The **current task's input** = the previous task's `$output`. **NOT the workflow's input arguments.** Only equals workflow input on the very first task. | Per-task |
|
|
12
12
|
| `$context` | Mutable shared state: `$context.variables.<name>`, `$context.outputs.<Activity>` | Workflow run |
|
|
13
13
|
| `$output` | The current task's raw output. | This task only |
|
|
14
|
+
| `$helpers` | Engine host functions, available in `run.script` code: `$helpers.file.fileToBase64(ref)` and `$helpers.file.base64ToFile({ base64, fileName?, mimeType? })` — both `async`, so `await` them. See [File references](#file-references-jobattachment-and-helpersfile). | Inside scripts |
|
|
14
15
|
| Loop bindings | Whatever name you set in `for.each` / `for.at`, prefixed with `$`. Examples: `for.each: "currentItem"` → `${$currentItem}`, `for.each: "customer"` → `${$customer}`, `for.at: "idx"` → `${$idx}`. The `$` is a literal character in the identifier — the unprefixed name is NOT bound. | Inside the loop body |
|
|
15
16
|
| Catch binding | `${$error}` — `catch.as: "error"` binds the global as `$error` (note the `$` prefix, same convention as loop iterators). Reference fields like `${$error.title}` / `${$error.detail}` / `${$error.originatingTaskName}`. | Inside `catch.do` |
|
|
16
17
|
|
|
@@ -259,6 +260,22 @@ Javascript_1 → adds $context.outputs.Javascript_1 (final summary comput
|
|
|
259
260
|
Response_1 → reads any $context data, ends workflow
|
|
260
261
|
```
|
|
261
262
|
|
|
263
|
+
## File References (`JobAttachment`) and `$helpers.file`
|
|
264
|
+
|
|
265
|
+
A file anywhere in a workflow — a file input, a binary HTTP response, the result of the base64 activities — is a **reference**, not bytes:
|
|
266
|
+
|
|
267
|
+
```json
|
|
268
|
+
{ "ID": "6f1c…", "FullName": "invoice.pdf", "MimeType": "application/pdf", "Metadata": { "Size": 48213, "Encoding": "byte-array" } }
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
- `$workflow.input.<file>` is that object. `$workflow.input.document.FullName` works; there is no `.content` / `.bytes`.
|
|
272
|
+
- `Metadata.Encoding` is `"byte-array"` (binary) or `"base64"` (the blob holds base64 text — what File to Base64 produces). It is a tag, nothing is converted on read.
|
|
273
|
+
- `await $helpers.file.fileToBase64(ref)` → a new `"base64"`-tagged reference (`<name>.base64`). Idempotent for an already-base64 reference.
|
|
274
|
+
- `await $helpers.file.base64ToFile({ base64: refOrString, fileName?, mimeType? })` → a new binary reference. `fileName` / `mimeType` only apply to a string input.
|
|
275
|
+
- `ref.serializeData()` — the one way to get a file's *content* into an HTTP request body or a Response field: `"${{ content: $context.outputs.FileToBase64_1.output.serializeData() }}"`. It returns a small deferred-read marker (`{ __uipathFileRead: { ref } }`) that the engine replaces with the content at send/egress time, so large data never enters `$context`. Use it only inline in a body / Response — not in an Assign, a variable, or script logic. Nested inside a JSON body field it is valid **only on a base64 reference** (File to Base64 output); a binary reference's marker or a bare reference nested in a body is a send-time error. A bare reference as the *whole* HTTP body is sent as the file's bytes.
|
|
276
|
+
|
|
277
|
+
Full guide (activity JSON, CLI run, pitfalls): [files-and-base64.md](files-and-base64.md).
|
|
278
|
+
|
|
262
279
|
## Anti-patterns
|
|
263
280
|
|
|
264
281
|
- **Do NOT** use `$input.<name>` to read workflow inputs from non-first tasks — `$input` is the previous task's `$output`. Use `$workflow.input.<name>`.
|
|
@@ -267,3 +284,5 @@ Response_1 → reads any $context data, ends workflow
|
|
|
267
284
|
- **Do NOT** use `var` inside JS_Invoke scripts — strict mode rejects implicit globals; use `const` / `let`.
|
|
268
285
|
- **Do NOT** wrap loop variable names (`each`, `at`) in `${...}` — those fields take plain identifiers.
|
|
269
286
|
- **Do NOT** mix `${...}` and string concatenation when a single expression form works: prefer `"${\"prefix-\" + $workflow.input.x}"` over splitting.
|
|
287
|
+
- **Do NOT** read a file input as text or bytes (`$workflow.input.document.content`) — inputs of file type are `JobAttachment` references. Convert with `$helpers.file.*` or inline with `.serializeData()`.
|
|
288
|
+
- **Do NOT** store `serializeData()` in a variable or pass it through a script — the marker is only resolved inside an HTTP body / Response.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Files & Base64 in API Workflows
|
|
2
|
+
|
|
3
|
+
How an API workflow handles files, and how the **File to Base64** / **Base64 to File** activities work — the JSON to write, the runtime behavior to expect, and how to run such a workflow from the CLI.
|
|
4
|
+
|
|
5
|
+
## 1. A file is a reference, not bytes
|
|
6
|
+
|
|
7
|
+
Every file an API workflow touches is a `JobAttachment`: a small object pointing at a blob in Orchestrator storage.
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"ID": "6f1c0d2e-8a1b-4c3d-9e0f-123456789abc",
|
|
12
|
+
"FullName": "invoice.pdf",
|
|
13
|
+
"MimeType": "application/pdf",
|
|
14
|
+
"Metadata": { "Size": 48213, "Encoding": "byte-array" }
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
| Field | Meaning |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `ID` | Attachment key in Orchestrator (GUID) |
|
|
21
|
+
| `FullName` | File name with extension |
|
|
22
|
+
| `MimeType` | Content type |
|
|
23
|
+
| `Metadata.Size` | Byte length, when known |
|
|
24
|
+
| `Metadata.Encoding` | `"byte-array"` (binary — the default) or `"base64"` (the blob's content is base64 *text*). A tag only: nothing is converted when reading |
|
|
25
|
+
|
|
26
|
+
Consequences:
|
|
27
|
+
- A file input declared in `input.schema` (`"$ref": "#/definitions/job-attachment"`, `x-uipath-resource-kind: "JobAttachment"`) arrives as this object: `$workflow.input.document.FullName` works; there is no `.content`.
|
|
28
|
+
- File bytes never enter `$context`, so context stays small no matter how big the file is.
|
|
29
|
+
- Everything that reads or writes files goes through Orchestrator blob storage, so it needs a signed-in session.
|
|
30
|
+
|
|
31
|
+
## 2. The two activities
|
|
32
|
+
|
|
33
|
+
Both are ordinary `run.script` tasks. What makes them *these* activities — for Studio Web's designer, for `uip api-workflow validate`, and for the engine — is `metadata.activityType` plus the `$helpers.file.*` call in the script.
|
|
34
|
+
|
|
35
|
+
**The script is one `return` expression and nothing else.** Studio Web does not keep the script text: on open it parses the `$helpers.file.*` call to fill the property panel, and on save it **rebuilds the script from the panel**. Anything the parser did not pick up is dropped silently, and the workflow breaks (or loses arguments) at the next designer save. The only shapes that survive a roundtrip:
|
|
36
|
+
|
|
37
|
+
- File to Base64: `return { output: await $helpers.file.fileToBase64(<ref>) }` — exactly **one** argument
|
|
38
|
+
- Base64 to File: `return { output: await $helpers.file.base64ToFile({ base64: <ref or string>, fileName?: <expr>, mimeType?: <expr> }) }` — exactly **one** object argument, only those keys
|
|
39
|
+
|
|
40
|
+
Dropped on save: a statement before the `return` (`const ref = …;`), a statement after it, a second argument (`fileToBase64(ref, { extra: 1 })`), extra keys in the options object. `uip api-workflow validate` warns about the extra statements ("rebuilds the script … and drops the rest, which breaks the workflow") but reports `Valid` with **no warning** for an extra argument or extra option key — check that shape yourself before validating. Any pre-processing (picking the right reference, normalising a string) goes in a JavaScript activity *before* the conversion; pass its output in as the single argument.
|
|
41
|
+
|
|
42
|
+
### File to Base64 (`FileToBase64`)
|
|
43
|
+
|
|
44
|
+
`await $helpers.file.fileToBase64(<file ref>)` → a **new** reference whose blob content *is* the base64 text: `<baseName>.base64`, `text/plain`, `Metadata.Encoding: "base64"`. Idempotent for an already-base64 reference. Input must be a reference (a string is a validation error).
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"FileToBase64_1": {
|
|
49
|
+
"run": {
|
|
50
|
+
"script": {
|
|
51
|
+
"code": "return { output: await $helpers.file.fileToBase64($workflow.input.document) }",
|
|
52
|
+
"language": "javascript",
|
|
53
|
+
"arguments": "${{ \"$context\": $context, \"$workflow\": $workflow, \"$input\": $input }}"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"export": { "as": "{ ...$context, outputs: { ...$context?.outputs, \"FileToBase64_1\": $output } }" },
|
|
57
|
+
"metadata": { "activityType": "FileToBase64", "displayName": "File to Base64", "fullName": "FileToBase64", "icon": "sw:convert-file-to-base64" }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Downstream: `$context.outputs.FileToBase64_1.output` (a `JobAttachment`).
|
|
63
|
+
|
|
64
|
+
### Base64 to File (`Base64ToFile`)
|
|
65
|
+
|
|
66
|
+
`await $helpers.file.base64ToFile({ base64, fileName?, mimeType? })` → a **new binary** reference.
|
|
67
|
+
- `base64` is a base64 file reference (from File to Base64) **or** a raw base64 string (an API response field, a variable).
|
|
68
|
+
- `fileName` / `mimeType` apply only to a **string** input. Omitted → MIME sniffed from the bytes, unique GUID-based name, extension from the MIME type. For a reference input they are ignored: the engine strips `.base64` and sniffs the type (plain text has no signature, so a `.txt` comes back extension-less as `application/octet-stream`).
|
|
69
|
+
- A reference that is **not** tagged `Encoding: "base64"` (a plain binary file) is returned unchanged — there is nothing to decode. Chaining Base64 to File directly on a raw file input is therefore a no-op, not an error.
|
|
70
|
+
- Omit the optional keys when unset — `fileName: ` with no value is a syntax error.
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"Base64ToFile_1": {
|
|
75
|
+
"run": {
|
|
76
|
+
"script": {
|
|
77
|
+
"code": "return { output: await $helpers.file.base64ToFile({ base64: $context.outputs.HTTP_Request_1.content.data, fileName: 'invoice.pdf', mimeType: 'application/pdf' }) }",
|
|
78
|
+
"language": "javascript",
|
|
79
|
+
"arguments": "${{ \"$context\": $context, \"$workflow\": $workflow, \"$input\": $input }}"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"export": { "as": "{ ...$context, outputs: { ...$context?.outputs, \"Base64ToFile_1\": $output } }" },
|
|
83
|
+
"metadata": { "activityType": "Base64ToFile", "displayName": "Base64 to File", "fullName": "Base64ToFile", "icon": "sw:convert-base64-to-file" }
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
A disabled activity gets `"if": "${false}"` on the task, like any other.
|
|
89
|
+
|
|
90
|
+
## 3. Getting a file's *content* into a request or a Response: `serializeData()`
|
|
91
|
+
|
|
92
|
+
`fileToBase64` gives you a file, not a string. To send the base64 text to an API, call `serializeData()` on the reference **inside the HTTP body or the Response expression**:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
"bodyParameters": { "body": "${{ name: $workflow.input.document.FullName, content: $context.outputs.FileToBase64_1.output.serializeData() }}" }
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
"response": "${{ encoded: $context.outputs.FileToBase64_1.output.serializeData() }}"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`serializeData()` is synchronous and returns a small deferred-read marker (`{ "__uipathFileRead": { "ref": … } }`); the engine replaces it with the file's content when the request is sent / the Response leaves the run. Rules:
|
|
103
|
+
- Use it **only** inline in an HTTP body or a Response field.
|
|
104
|
+
- Do **not** assign it to a variable, return it from a script, or run logic on it — you would keep the marker, not the content.
|
|
105
|
+
- **Nested in a JSON body field, only a base64 reference works** (the File to Base64 output). A `serializeData()` marker on a *binary* reference nested in a body fails at send time with `Raw bytes cannot be embedded in JSON — convert the file with File to Base64 first`, and a *bare* reference nested in a body fails with `A bare file reference cannot be embedded in a nested field`. So: `content: $workflow.input.document.serializeData()` is wrong; `content: $context.outputs.FileToBase64_1.output.serializeData()` is right.
|
|
106
|
+
- To send a binary file **as-is**, make the bare reference the *whole* HTTP body — it is sent as the file's bytes with its `MimeType` as `Content-Type` (no `serializeData()` needed).
|
|
107
|
+
- In a Response, markers are resolved anywhere; bare references are returned as references.
|
|
108
|
+
|
|
109
|
+
## 4. A complete round trip
|
|
110
|
+
|
|
111
|
+
[assets/templates/file-base64-roundtrip-example.json](../assets/templates/file-base64-roundtrip-example.json): `document` file input → `FileToBase64_1` → `Base64ToFile_1` → `Response_1` returning both references. The typical real-world chain is `File to Base64 → HTTP POST (body uses .serializeData()) → Base64 to File (vendor's base64 response string, with fileName/mimeType) → Response`.
|
|
112
|
+
|
|
113
|
+
## 5. Running a workflow that uses files
|
|
114
|
+
|
|
115
|
+
Files live in Orchestrator blob storage, so the run needs a session — `uip api-workflow run --no-auth` refuses a workflow that calls `$helpers.file.*` before the engine starts (and refuses `--input-file` / `--output-dir`). Rule 21 still applies: ask before running.
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
uip login # once
|
|
119
|
+
uip api-workflow run ./MyApiProject/Workflow.json \
|
|
120
|
+
--input-file document=./invoice.pdf \ # upload → $workflow.input.document (repeatable)
|
|
121
|
+
--output-dir ./out \ # download every reference in the output
|
|
122
|
+
--output json
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- `--input-file <name>=<path>`: the local file is uploaded (MIME type from the extension) and the reference is placed under `<name>` in the input — exactly what Studio Web's run panel produces.
|
|
126
|
+
- `--output-dir <dir>`: every `JobAttachment` in the output is downloaded into `<dir>`; the printed reference gains `LocalPath`. Same-named blobs get an `-<Id>` suffix.
|
|
127
|
+
- `--folder-key <guid>`: when the tenant's Attachments API requires a folder.
|
|
128
|
+
- The CLI PascalCases printed keys: `ID` → `Id`, `encoded` → `Encoded`.
|
|
129
|
+
|
|
130
|
+
Example output:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"Result": "Success",
|
|
135
|
+
"Code": "WorkflowRun",
|
|
136
|
+
"Data": {
|
|
137
|
+
"Encoded": { "Id": "…", "FullName": "hello.base64", "MimeType": "text/plain", "Metadata": { "Size": 72, "Encoding": "base64" }, "LocalPath": "/abs/out/hello.base64" },
|
|
138
|
+
"Decoded": { "Id": "…", "FullName": "hello", "MimeType": "application/octet-stream", "Metadata": { "Size": 54, "Encoding": "byte-array" }, "LocalPath": "/abs/out/hello" }
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
`uip api-workflow validate` covers these activities offline: it accepts `FileToBase64` / `Base64ToFile` and rejects a task of either type whose script does not call its `$helpers.file.*` function.
|
|
144
|
+
|
|
145
|
+
## 6. Limits and gotchas
|
|
146
|
+
|
|
147
|
+
- **Size:** file references have no practical size cap — a reference with a declared `Metadata.Size` above 1 MB, or with **no** declared size (common for job inputs), streams with bounded memory at any size. Only in-memory inputs are capped at 50 MB per conversion: a raw base64 *string*, or a reference small enough to be buffered.
|
|
148
|
+
- **Namespace:** `$helpers.fileToBase64` (no `.file.`) fails with `is not a function` and fails `validate`.
|
|
149
|
+
- **Invalid base64:** a `data:…;base64,` prefix and whitespace/line breaks are **tolerated** (stripped before decoding). What is rejected with `The provided value is not a valid base64 string: base64ToFile`: the URL-safe alphabet (`-` / `_`), other non-base64 characters, bad padding, and an empty string. The suffix is always the literal helper name `base64ToFile`, never your task key — grep logs for the message text, not for `Base64ToFile_1`.
|
|
150
|
+
- **Names:** `fileName` / `mimeType` never rename a reference input; a decoded text file loses its extension.
|
|
151
|
+
- **Preview feature:** in Studio Web the two activities sit behind the `FE.EnableBase64Activities` flag and are marked "in preview".
|
|
152
|
+
|
|
153
|
+
Pitfalls with symptoms and fixes: [troubleshooting.md](troubleshooting.md#file--base64-pitfalls).
|
|
@@ -68,9 +68,10 @@ Two surfaces that look useful and are NOT, for API-workflow jobs:
|
|
|
68
68
|
| Command | What it actually returns |
|
|
69
69
|
|---------|--------------------------|
|
|
70
70
|
| `uip or jobs logs <jobId>` | Lifecycle lines only — `"Workflow started"` / `"Workflow completed"`, both at level `Info`. It reports **`Workflow completed` even for a Faulted job** and never carries the error. Do not diagnose from it, and never read "completed" as success. |
|
|
71
|
-
| `uip traces spans get --job-key <jobKey>` |
|
|
71
|
+
| `uip traces spans get --job-key <jobKey>` | Returned `"Error retrieving trace ID for job"` on every API-workflow job probed. The CLI emits that message for any trace-ID lookup failure (a malformed GUID included), so read it as "no trace resolved for this job" rather than proof the surface is absent. Either way it carries no fault detail. |
|
|
72
|
+
| `uip or jobs traces <jobId>` | Documented Agent-type-process-only — not applicable to an API-workflow job. |
|
|
72
73
|
|
|
73
|
-
> **Diagnose before you tear down.**
|
|
74
|
+
> **Diagnose before you tear down.** After uninstalling the deployment, `uip or jobs get <jobId>` returns `Result: Failure` with an empty `State`. Jobs themselves are immutable audit records (`uip or jobs --help`: they "cannot be deleted -- they age out per the binding process's retention period"), so the likely cause is that the folder/process context needed to resolve the job is gone, not the records. Either way, capture what you need while the deployment still stands.
|
|
74
75
|
|
|
75
76
|
> For per-activity detail the local loop is stronger than anything in cloud: reproduce with `uip api-workflow run <Workflow.json> --no-auth --output json`, which names the failing activity. Cloud gives you the fault message; local gives you its position.
|
|
76
77
|
|