@uipath/skills 1.204.0 → 1.204.1
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 +12 -14
- package/package.json +1 -1
- package/skills/uipath-agents/references/coded/embedding-in-flows.md +1 -3
- package/skills/uipath-agents/references/coded/quickstart.md +0 -2
- package/skills/uipath-agents/references/lowcode/capabilities/inline-in-flow/inline-in-flow.md +10 -8
- package/skills/uipath-agents/references/lowcode/prompting/autonomous-agent-prompting-guide.md +1 -1
- package/skills/uipath-human-in-the-loop/SKILL.md +1 -3
- package/skills/uipath-human-in-the-loop/references/hitl-node-apptask.md +0 -2
- package/skills/uipath-human-in-the-loop/references/hitl-node-coded-action-app.md +0 -2
- package/skills/uipath-human-in-the-loop/references/hitl-node-quickform.md +2 -2
- package/skills/uipath-maestro-flow/.maintenance/README.md +265 -0
- package/skills/uipath-maestro-flow/.maintenance/check-all.sh +40 -0
- package/skills/uipath-maestro-flow/.maintenance/check-anchors.sh +101 -0
- package/skills/uipath-maestro-flow/.maintenance/check-depth.sh +132 -0
- package/skills/uipath-maestro-flow/.maintenance/check-link-text.sh +123 -0
- package/skills/uipath-maestro-flow/.maintenance/check-links.sh +73 -0
- package/skills/uipath-maestro-flow/.maintenance/check-orphans.sh +93 -0
- package/skills/uipath-maestro-flow/.maintenance/check-plugin-pairs.sh +39 -0
- package/skills/uipath-maestro-flow/.maintenance/check-template.sh +42 -0
- package/skills/uipath-maestro-flow/.maintenance/check-uip-commands.sh +270 -0
- package/skills/uipath-maestro-flow/.maintenance/check-versions.sh +160 -0
- package/skills/uipath-maestro-flow/SKILL.md +69 -886
- package/skills/uipath-maestro-flow/references/author/CAPABILITY.md +207 -0
- package/skills/uipath-maestro-flow/references/author/brownfield.md +91 -0
- package/skills/uipath-maestro-flow/references/author/editing-operations-cli.md +190 -0
- package/skills/uipath-maestro-flow/references/author/editing-operations-json.md +374 -0
- package/skills/uipath-maestro-flow/references/author/editing-operations.md +104 -0
- package/skills/uipath-maestro-flow/references/author/greenfield.md +420 -0
- package/skills/uipath-maestro-flow/references/author/planning-arch.md +364 -0
- package/skills/uipath-maestro-flow/references/author/planning-impl.md +291 -0
- package/skills/uipath-maestro-flow/references/author/plugins/agent/impl.md +237 -0
- package/skills/uipath-maestro-flow/references/author/plugins/agent/planning.md +97 -0
- package/skills/uipath-maestro-flow/references/author/plugins/agentic-process/impl.md +107 -0
- package/skills/uipath-maestro-flow/references/author/plugins/agentic-process/planning.md +61 -0
- package/skills/uipath-maestro-flow/references/author/plugins/api-workflow/impl.md +108 -0
- package/skills/uipath-maestro-flow/references/author/plugins/api-workflow/planning.md +60 -0
- package/skills/uipath-maestro-flow/references/author/plugins/batch-transform/impl.md +171 -0
- package/skills/uipath-maestro-flow/references/author/plugins/batch-transform/planning.md +72 -0
- package/skills/uipath-maestro-flow/references/author/plugins/connector/impl-inline.md +120 -0
- package/skills/uipath-maestro-flow/references/author/plugins/connector/impl.md +463 -0
- package/skills/uipath-maestro-flow/references/author/plugins/connector/planning.md +186 -0
- package/skills/uipath-maestro-flow/references/author/plugins/connector-trigger/impl.md +517 -0
- package/skills/uipath-maestro-flow/references/author/plugins/connector-trigger/planning.md +115 -0
- package/skills/uipath-maestro-flow/references/author/plugins/conversational-agent/impl.md +309 -0
- package/skills/uipath-maestro-flow/references/author/plugins/conversational-agent/planning.md +133 -0
- package/skills/uipath-maestro-flow/references/author/plugins/data-fabric/impl.md +428 -0
- package/skills/uipath-maestro-flow/references/author/plugins/data-fabric/planning.md +188 -0
- package/skills/uipath-maestro-flow/references/author/plugins/decision/impl.md +83 -0
- package/skills/uipath-maestro-flow/references/author/plugins/decision/planning.md +38 -0
- package/skills/uipath-maestro-flow/references/author/plugins/delay/impl.md +38 -0
- package/skills/uipath-maestro-flow/references/author/plugins/delay/planning.md +53 -0
- package/skills/uipath-maestro-flow/references/author/plugins/end/impl.md +56 -0
- package/skills/uipath-maestro-flow/references/author/plugins/end/planning.md +28 -0
- package/skills/uipath-maestro-flow/references/author/plugins/flow/impl.md +107 -0
- package/skills/uipath-maestro-flow/references/author/plugins/flow/planning.md +58 -0
- package/skills/uipath-maestro-flow/references/author/plugins/hitl/impl.md +181 -0
- package/skills/uipath-maestro-flow/references/author/plugins/hitl/planning.md +166 -0
- package/skills/uipath-maestro-flow/references/author/plugins/http/impl-connector.md +86 -0
- 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/plugins/http/planning.md +107 -0
- package/skills/uipath-maestro-flow/references/author/plugins/inline-agent/impl.md +540 -0
- package/skills/uipath-maestro-flow/references/author/plugins/inline-agent/planning.md +115 -0
- package/skills/uipath-maestro-flow/references/author/plugins/inline-voice-agent/impl.md +269 -0
- package/skills/uipath-maestro-flow/references/author/plugins/inline-voice-agent/planning.md +128 -0
- package/skills/uipath-maestro-flow/references/author/plugins/ixp/impl.md +424 -0
- package/skills/uipath-maestro-flow/references/author/plugins/ixp/planning.md +95 -0
- package/skills/uipath-maestro-flow/references/author/plugins/loop/impl.md +403 -0
- package/skills/uipath-maestro-flow/references/author/plugins/loop/planning.md +60 -0
- 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/queue/impl.md +82 -0
- package/skills/uipath-maestro-flow/references/author/plugins/queue/planning.md +44 -0
- package/skills/uipath-maestro-flow/references/author/plugins/rpa/impl.md +117 -0
- package/skills/uipath-maestro-flow/references/author/plugins/rpa/planning.md +61 -0
- package/skills/uipath-maestro-flow/references/author/plugins/scheduled-trigger/impl.md +56 -0
- package/skills/uipath-maestro-flow/references/author/plugins/scheduled-trigger/planning.md +93 -0
- package/skills/uipath-maestro-flow/references/author/plugins/script/impl.md +98 -0
- package/skills/uipath-maestro-flow/references/author/plugins/script/planning.md +42 -0
- package/skills/uipath-maestro-flow/references/author/plugins/subflow/impl.md +164 -0
- package/skills/uipath-maestro-flow/references/author/plugins/subflow/planning.md +35 -0
- 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/impl.md +72 -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/terminate/planning.md +29 -0
- package/skills/uipath-maestro-flow/references/author/plugins/transform/impl.md +252 -0
- package/skills/uipath-maestro-flow/references/author/plugins/transform/planning.md +47 -0
- package/skills/uipath-maestro-flow/references/diagnose/CAPABILITY.md +73 -0
- package/skills/uipath-maestro-flow/references/diagnose/failure-modes.md +353 -0
- package/skills/uipath-maestro-flow/references/diagnose/troubleshooting-guide.md +174 -0
- package/skills/uipath-maestro-flow/references/evaluate/CAPABILITY.md +134 -0
- package/skills/uipath-maestro-flow/references/evaluate/commands-reference.md +376 -0
- package/skills/uipath-maestro-flow/references/evaluate/eval-sets-guide.md +227 -0
- package/skills/uipath-maestro-flow/references/evaluate/evaluators-guide.md +143 -0
- package/skills/uipath-maestro-flow/references/evaluate/running-guide.md +215 -0
- package/skills/uipath-maestro-flow/references/evaluate/upload-safety.md +94 -0
- package/skills/uipath-maestro-flow/references/operate/CAPABILITY.md +77 -0
- package/skills/uipath-maestro-flow/references/operate/manage.md +39 -0
- package/skills/uipath-maestro-flow/references/operate/run.md +121 -0
- package/skills/uipath-maestro-flow/references/operate/ship.md +57 -0
- package/skills/uipath-maestro-flow/references/shared/action-nodes.md +100 -0
- package/skills/uipath-maestro-flow/references/shared/cli-commands.md +269 -0
- package/skills/uipath-maestro-flow/references/shared/cli-conventions.md +178 -0
- package/skills/uipath-maestro-flow/references/shared/file-format.md +582 -0
- package/skills/uipath-maestro-flow/references/shared/node-output-wiring.md +86 -0
- package/skills/uipath-maestro-flow/references/shared/ux-narration-and-todos.md +113 -0
- package/skills/uipath-maestro-flow/references/shared/variables-and-expressions.md +787 -0
- package/skills/uipath-platform/references/integration-service/activities.md +2 -2
- package/skills/uipath-platform/references/integration-service/activity-generation.md +8 -1
- package/skills/uipath-platform/references/integration-service/triggers.md +1 -3
- package/version-manifest.json +1 -1
- package/skills/uipath-maestro-flow/examples/AquariumSafetyStop.flow.ts +0 -26
- package/skills/uipath-maestro-flow/examples/ArchiveCardExtract.flow.ts +0 -38
- package/skills/uipath-maestro-flow/examples/BakeOffEntryForm.flow.ts +0 -27
- package/skills/uipath-maestro-flow/examples/BeeHiveLedger.flow.ts +0 -61
- package/skills/uipath-maestro-flow/examples/BeltProgression.flow.ts +0 -53
- package/skills/uipath-maestro-flow/examples/BirdCountLookup.flow.ts +0 -24
- package/skills/uipath-maestro-flow/examples/ClubDirectory.flow.ts +0 -56
- package/skills/uipath-maestro-flow/examples/ConcertSoundcheck.flow.ts +0 -59
- package/skills/uipath-maestro-flow/examples/DoorbellLog.flow.ts +0 -45
- package/skills/uipath-maestro-flow/examples/FestivalMapScaffold.flow.ts +0 -22
- package/skills/uipath-maestro-flow/examples/FieldTripQuickForm.flow.ts +0 -45
- package/skills/uipath-maestro-flow/examples/FossilCatalogEnrich.flow.ts +0 -26
- package/skills/uipath-maestro-flow/examples/GallerySubmission.flow.ts +0 -67
- package/skills/uipath-maestro-flow/examples/GreenhouseWatering.flow.ts +0 -39
- package/skills/uipath-maestro-flow/examples/HarbourRadioLine.flow.ts +0 -31
- package/skills/uipath-maestro-flow/examples/HerbariumDispatch.flow.ts +0 -34
- package/skills/uipath-maestro-flow/examples/KilnReview.flow.ts +0 -38
- package/skills/uipath-maestro-flow/examples/LibraryDeskChat.flow.ts +0 -39
- package/skills/uipath-maestro-flow/examples/LighthouseSignal.flow.ts +0 -30
- package/skills/uipath-maestro-flow/examples/MeteorShowerPages.flow.ts +0 -39
- package/skills/uipath-maestro-flow/examples/NeighborhoodWalkPlanner.flow.ts +0 -27
- package/skills/uipath-maestro-flow/examples/ObservatorySeeing.flow.ts +0 -51
- package/skills/uipath-maestro-flow/examples/OralHistoryDigest.flow.ts +0 -31
- package/skills/uipath-maestro-flow/examples/PlanetariumConfirmation.flow.ts +0 -34
- package/skills/uipath-maestro-flow/examples/PlantNameAdvisor.flow.ts +0 -28
- package/skills/uipath-maestro-flow/examples/PostcardCaption.flow.ts +0 -44
- package/skills/uipath-maestro-flow/examples/PotteryStudioCallback.flow.ts +0 -41
- package/skills/uipath-maestro-flow/examples/RecipeScaler.flow.ts +0 -62
- package/skills/uipath-maestro-flow/examples/SeedPacketReader.flow.ts +0 -49
- package/skills/uipath-maestro-flow/examples/TideTableConverter.flow.ts +0 -35
- package/skills/uipath-maestro-flow/examples/TrailLogSummary.flow.ts +0 -75
- package/skills/uipath-maestro-flow/examples/WorkshopInventory.flow.ts +0 -27
- package/skills/uipath-maestro-flow/examples/bindings.json +0 -85
- package/skills/uipath-maestro-flow/references/CLI-LOOP.md +0 -309
- package/skills/uipath-maestro-flow/references/agent-resources.md +0 -74
- package/skills/uipath-maestro-flow/references/agent.md +0 -175
- package/skills/uipath-maestro-flow/references/agentic-process.md +0 -41
- package/skills/uipath-maestro-flow/references/api-workflow.md +0 -29
- package/skills/uipath-maestro-flow/references/author.md +0 -178
- package/skills/uipath-maestro-flow/references/batch-transform.md +0 -23
- package/skills/uipath-maestro-flow/references/bindings.md +0 -178
- package/skills/uipath-maestro-flow/references/branch.md +0 -18
- package/skills/uipath-maestro-flow/references/brownfield.md +0 -152
- package/skills/uipath-maestro-flow/references/connector-params.md +0 -624
- package/skills/uipath-maestro-flow/references/conversational.md +0 -77
- package/skills/uipath-maestro-flow/references/data-fabric.md +0 -268
- package/skills/uipath-maestro-flow/references/delay.md +0 -26
- package/skills/uipath-maestro-flow/references/diagnose.md +0 -141
- package/skills/uipath-maestro-flow/references/document-pipeline.md +0 -47
- package/skills/uipath-maestro-flow/references/error-handling.md +0 -75
- package/skills/uipath-maestro-flow/references/evaluate.md +0 -168
- package/skills/uipath-maestro-flow/references/event-trigger.md +0 -155
- package/skills/uipath-maestro-flow/references/form-trigger.md +0 -41
- package/skills/uipath-maestro-flow/references/hitl.md +0 -169
- package/skills/uipath-maestro-flow/references/http.md +0 -105
- package/skills/uipath-maestro-flow/references/inline-agent.md +0 -132
- package/skills/uipath-maestro-flow/references/ixp.md +0 -167
- package/skills/uipath-maestro-flow/references/loops.md +0 -77
- package/skills/uipath-maestro-flow/references/manual-trigger.md +0 -39
- package/skills/uipath-maestro-flow/references/operate.md +0 -204
- package/skills/uipath-maestro-flow/references/or-processes.md +0 -91
- package/skills/uipath-maestro-flow/references/parallel-merge.md +0 -21
- package/skills/uipath-maestro-flow/references/placeholder.md +0 -70
- package/skills/uipath-maestro-flow/references/published-function.md +0 -66
- package/skills/uipath-maestro-flow/references/queue.md +0 -53
- package/skills/uipath-maestro-flow/references/return.md +0 -20
- package/skills/uipath-maestro-flow/references/rpa-workflow.md +0 -27
- package/skills/uipath-maestro-flow/references/scheduled-trigger.md +0 -34
- package/skills/uipath-maestro-flow/references/script.md +0 -52
- package/skills/uipath-maestro-flow/references/subflow.md +0 -33
- package/skills/uipath-maestro-flow/references/summarize.md +0 -20
- package/skills/uipath-maestro-flow/references/switch.md +0 -20
- package/skills/uipath-maestro-flow/references/terminate.md +0 -22
- package/skills/uipath-maestro-flow/references/transform.md +0 -32
- package/skills/uipath-maestro-flow/references/voice.md +0 -70
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: a two-way `.branch` — run one of two paths on a boolean condition.
|
|
3
|
-
*
|
|
4
|
-
* The scenario is deliberately generic (a greenhouse sensor) so it shows the
|
|
5
|
-
* SHAPE, not a task answer: a condition, a `yes` arm, a `no` arm, each ending in
|
|
6
|
-
* its own `.return()`.
|
|
7
|
-
*
|
|
8
|
-
* .branch(name, <js boolean>, (yes) => …, (no) => …)
|
|
9
|
-
*
|
|
10
|
-
* `js\`…\`` builds the condition from inputs/vars/step outputs; each arm is a
|
|
11
|
-
* sub-builder exactly like the top-level flow. An arm that ends in `.return()`
|
|
12
|
-
* is that path's End node — the two arms are independent endings, not a join.
|
|
13
|
-
*/
|
|
14
|
-
import { flow, script, input, out, js, types } from '@uipath/maestro-builder-sdk';
|
|
15
|
-
|
|
16
|
-
export default flow('greenhouse-watering')
|
|
17
|
-
.name('GreenhouseWatering')
|
|
18
|
-
.version('1.0.0')
|
|
19
|
-
.input({ moisture: types.number, threshold: types.number })
|
|
20
|
-
.output({ action: types.string })
|
|
21
|
-
|
|
22
|
-
.branch(
|
|
23
|
-
'needsWater',
|
|
24
|
-
js`${input('moisture')} < ${input('threshold')}`,
|
|
25
|
-
(yes) =>
|
|
26
|
-
yes
|
|
27
|
-
.step('water', script({
|
|
28
|
-
code: 'return "watered: moisture " + $vars.start.output.moisture + " is below " + $vars.start.output.threshold;',
|
|
29
|
-
}))
|
|
30
|
-
.return({ action: out('water') }),
|
|
31
|
-
(no) =>
|
|
32
|
-
no
|
|
33
|
-
.step('hold', script({
|
|
34
|
-
code: 'return "held off: moisture " + $vars.start.output.moisture + " is at or above " + $vars.start.output.threshold;',
|
|
35
|
-
}))
|
|
36
|
-
.return({ action: out('hold') }),
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
.build();
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: answer an INBOUND phone call (`core.trigger.voice`).
|
|
3
|
-
*
|
|
4
|
-
* `voiceTrigger()` takes no arguments — the platform hands the flow a call that
|
|
5
|
-
* has already connected, and the start step publishes its `callContext`. That
|
|
6
|
-
* is the only difference from the outbound shape in
|
|
7
|
-
* `PotteryStudioCallback.flow.ts`, which dials first and reads the context off
|
|
8
|
-
* the dial step instead.
|
|
9
|
-
*
|
|
10
|
-
* Pass `out('start', 'callContext')` whole. It is an OBJECT; reaching inside it
|
|
11
|
-
* for `conversationId` passes the file's schema and then fails at dispatch.
|
|
12
|
-
*
|
|
13
|
-
* Generic scenario: answer the harbour's information line.
|
|
14
|
-
*/
|
|
15
|
-
import { flow, voiceTrigger, voiceAgent, endCall, out, types } from '@uipath/maestro-builder-sdk';
|
|
16
|
-
|
|
17
|
-
export default flow('harbour-radio-line')
|
|
18
|
-
.name('HarbourRadioLine')
|
|
19
|
-
.version('1.0.0')
|
|
20
|
-
.output({ callSummary: types.string })
|
|
21
|
-
.trigger(voiceTrigger())
|
|
22
|
-
.step('greet', voiceAgent({
|
|
23
|
-
systemPrompt:
|
|
24
|
-
'Answer the harbour information line. Give tide times and berth availability, '
|
|
25
|
-
+ 'and take a message for the harbourmaster if you cannot help.',
|
|
26
|
-
callContext: out('start', 'callContext'),
|
|
27
|
-
voice: { model: 'gemini-3.1-flash-live-preview', persona: 'Kore' },
|
|
28
|
-
}))
|
|
29
|
-
.step('hangUp', endCall({ callContext: out('start', 'callContext') }))
|
|
30
|
-
.return({ callSummary: out('greet') })
|
|
31
|
-
.build();
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: a scheduled flow that creates an Orchestrator queue item.
|
|
3
|
-
*
|
|
4
|
-
* A scheduled trigger has no caller, so the specimen record is part of the
|
|
5
|
-
* flow. The queue step hands that record to a separately managed worker.
|
|
6
|
-
*
|
|
7
|
-
* Generic scenario: send one preserved plant specimen to a daily cataloguing
|
|
8
|
-
* queue. This demonstrates the timer and queue surfaces without mirroring an
|
|
9
|
-
* eval task's business process.
|
|
10
|
-
*/
|
|
11
|
-
import { flow, scheduled, queueItem, script, out, types } from '@uipath/maestro-builder-sdk';
|
|
12
|
-
|
|
13
|
-
const CATALOG_QUEUE = 'HerbariumCatalog';
|
|
14
|
-
const CATALOG_FOLDER = 'Shared';
|
|
15
|
-
const CATALOG_KEY = '6a09e667-bb67-4e3c-8d3d-20e5b6f14a21';
|
|
16
|
-
|
|
17
|
-
export default flow('herbarium-dispatch')
|
|
18
|
-
.name('HerbariumDispatch')
|
|
19
|
-
.version('1.0.0')
|
|
20
|
-
.output({ receipt: types.string })
|
|
21
|
-
.trigger(scheduled({ every: 'R/P1D' }))
|
|
22
|
-
.step('catalogSpecimen', queueItem({
|
|
23
|
-
queue: CATALOG_QUEUE,
|
|
24
|
-
folderPath: CATALOG_FOLDER,
|
|
25
|
-
key: CATALOG_KEY,
|
|
26
|
-
item: { SpecimenId: 'HERB-204', Family: 'Polypodiaceae', Cabinet: 'Ferns' },
|
|
27
|
-
reference: 'HERB-204',
|
|
28
|
-
priority: 'Normal',
|
|
29
|
-
}))
|
|
30
|
-
.step('recordDispatch', script({
|
|
31
|
-
code: 'return "catalogued specimen HERB-204";',
|
|
32
|
-
}))
|
|
33
|
-
.return({ receipt: out('recordDispatch') })
|
|
34
|
-
.build();
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: a human task whose form is supplied by a deployed Action App.
|
|
3
|
-
*
|
|
4
|
-
* The flow identifies the app and binds values to the app's own input names.
|
|
5
|
-
* Outcomes still belong to the flow and are read through `Action`.
|
|
6
|
-
*
|
|
7
|
-
* Generic scenario: let a studio coordinator approve a pottery kiln firing.
|
|
8
|
-
*/
|
|
9
|
-
import { flow, hitl, script, input, out, types } from '@uipath/maestro-builder-sdk';
|
|
10
|
-
|
|
11
|
-
export default flow('kiln-review')
|
|
12
|
-
.name('KilnReview')
|
|
13
|
-
.version('1.0.0')
|
|
14
|
-
.input({ pieceName: types.string, targetCelsius: types.number })
|
|
15
|
-
.output({ decision: types.string })
|
|
16
|
-
.step('reviewFiring', hitl({
|
|
17
|
-
variant: 'action-app',
|
|
18
|
-
title: 'Kiln firing review',
|
|
19
|
-
priority: 'Medium',
|
|
20
|
-
app: {
|
|
21
|
-
name: 'Kiln Firing Review',
|
|
22
|
-
key: '3c6ef372-fe94-4f82-aa0b-6d1f45c8b721',
|
|
23
|
-
folderPath: 'Shared',
|
|
24
|
-
inputs: {
|
|
25
|
-
'Piece Name': input('pieceName'),
|
|
26
|
-
'Target Celsius': input('targetCelsius'),
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
outcomes: ['Fire', 'Hold'],
|
|
30
|
-
}))
|
|
31
|
-
.step('recordDecision', script({
|
|
32
|
-
code: `const action = $vars.reviewFiring.output.Action;
|
|
33
|
-
return action === 'Fire'
|
|
34
|
-
? 'scheduled:' + $vars.start.output.pieceName
|
|
35
|
-
: 'held:' + $vars.start.output.pieceName;`,
|
|
36
|
-
}))
|
|
37
|
-
.return({ decision: out('recordDecision') })
|
|
38
|
-
.build();
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: work a live CHAT — wait for a message, answer it, post a reply.
|
|
3
|
-
*
|
|
4
|
-
* Every conversational step is keyed by a `conversationId`, and
|
|
5
|
-
* `conversationTrigger()` publishes it as `out('start', 'conversationId')`.
|
|
6
|
-
*
|
|
7
|
-
* `waitForMessage` SUSPENDS the flow — it is a catch event, not a poll. Use
|
|
8
|
-
* `conversationalAgent` when the model decides what to say and `sendMessage`
|
|
9
|
-
* when the flow does; this example shows both, so the agent answers and the
|
|
10
|
-
* flow closes the exchange itself.
|
|
11
|
-
*
|
|
12
|
-
* Generic scenario: answer a question at a library help desk.
|
|
13
|
-
*/
|
|
14
|
-
import {
|
|
15
|
-
flow, conversationTrigger, waitForMessage, conversationalAgent, sendMessage,
|
|
16
|
-
out, types,
|
|
17
|
-
} from '@uipath/maestro-builder-sdk';
|
|
18
|
-
|
|
19
|
-
export default flow('library-desk-chat')
|
|
20
|
-
.name('LibraryDeskChat')
|
|
21
|
-
.version('1.0.0')
|
|
22
|
-
.output({ answered: types.string })
|
|
23
|
-
.trigger(conversationTrigger())
|
|
24
|
-
.step('listen', waitForMessage({
|
|
25
|
-
conversationId: out('start', 'conversationId'),
|
|
26
|
-
}))
|
|
27
|
-
.step('answer', conversationalAgent({
|
|
28
|
-
model: 'gpt-5.4',
|
|
29
|
-
systemPrompt: 'Answer library questions in one or two sentences. Say so when unsure.',
|
|
30
|
-
settings: { mode: 'simple', context: out('listen', 'conversationContext') },
|
|
31
|
-
}))
|
|
32
|
-
.step('closeExchange', sendMessage({
|
|
33
|
-
conversationId: out('start', 'conversationId'),
|
|
34
|
-
exchangeId: out('listen', 'exchangeId'),
|
|
35
|
-
content: 'Ask again any time — the desk is open until six.',
|
|
36
|
-
endExchange: true,
|
|
37
|
-
}))
|
|
38
|
-
.return({ answered: out('answer') })
|
|
39
|
-
.build();
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: a standalone HTTP call followed by a delay.
|
|
3
|
-
*
|
|
4
|
-
* `managed: false` emits the plain HTTP node, where response status and body
|
|
5
|
-
* remain ordinary outputs. A delay publishes nothing; the next step reads the
|
|
6
|
-
* HTTP result, not the timer.
|
|
7
|
-
*
|
|
8
|
-
* Generic scenario: read a lighthouse signal and pause before recording it.
|
|
9
|
-
*/
|
|
10
|
-
import { flow, http, delay, script, input, out, tmpl, types } from '@uipath/maestro-builder-sdk';
|
|
11
|
-
|
|
12
|
-
export default flow('lighthouse-signal')
|
|
13
|
-
.name('LighthouseSignal')
|
|
14
|
-
.version('1.0.0')
|
|
15
|
-
.input({ station: types.string })
|
|
16
|
-
.output({ report: types.string })
|
|
17
|
-
.step('readSignal', http({
|
|
18
|
-
method: 'GET',
|
|
19
|
-
url: tmpl`https://signals.example.com/stations/${input('station')}`,
|
|
20
|
-
managed: false,
|
|
21
|
-
returns: { signal: 'string' },
|
|
22
|
-
}))
|
|
23
|
-
.step('cooldown', delay({ duration: 'PT2S' }))
|
|
24
|
-
.step('recordSignal', script({
|
|
25
|
-
code:
|
|
26
|
-
'return "station " + $vars.start.output.station + ": "'
|
|
27
|
-
+ ' + String($vars.readSignal.output.body.signal || "unknown");',
|
|
28
|
-
}))
|
|
29
|
-
.return({ report: out('recordSignal') })
|
|
30
|
-
.build();
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: `.doWhile` — run a body, then repeat WHILE a condition holds.
|
|
3
|
-
*
|
|
4
|
-
* The condition is checked AFTER each pass, so the body always runs at least
|
|
5
|
-
* once (`core.logic.dowhile`). That is the difference from `.loop()`, which
|
|
6
|
-
* iterates a collection it already has.
|
|
7
|
-
*
|
|
8
|
-
* The container publishes NO data output. Carry results out through a `.var()`
|
|
9
|
-
* written from inside the body with `{ updates }` — here `page` advances the
|
|
10
|
-
* cursor and doubles as the loop's own state. `limit` caps iterations (1–10,000;
|
|
11
|
-
* blank means the platform default of 10,000), and `body.break()` works exactly
|
|
12
|
-
* as it does in `.loop()`.
|
|
13
|
-
*
|
|
14
|
-
* Generic scenario: page through a meteor-shower sightings feed until it ends.
|
|
15
|
-
*/
|
|
16
|
-
import { flow, http, script, js, tmpl, v, out, types } from '@uipath/maestro-builder-sdk';
|
|
17
|
-
|
|
18
|
-
export default flow('meteor-shower-pages')
|
|
19
|
-
.name('MeteorShowerPages')
|
|
20
|
-
.version('1.0.0')
|
|
21
|
-
.output({ pagesRead: types.string })
|
|
22
|
-
.var('page', types.number, 1)
|
|
23
|
-
.doWhile(
|
|
24
|
-
'paginate',
|
|
25
|
-
js`$vars.fetchPage.output.body.hasNextPage === true`,
|
|
26
|
-
(body) => body
|
|
27
|
-
.step('fetchPage', http({
|
|
28
|
-
method: 'GET',
|
|
29
|
-
url: tmpl`https://sightings.example.com/meteors?page=${v('page')}`,
|
|
30
|
-
managed: false,
|
|
31
|
-
returns: { hasNextPage: 'boolean' },
|
|
32
|
-
}), { updates: { page: js`$vars.page + 1` } }),
|
|
33
|
-
{ limit: 50 },
|
|
34
|
-
)
|
|
35
|
-
.step('reportPages', script({
|
|
36
|
-
code: 'return "read " + String($vars.page - 1) + " page(s) of sightings";',
|
|
37
|
-
}))
|
|
38
|
-
.return({ pagesRead: out('reportPages') })
|
|
39
|
-
.build();
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: call a published agentic process and wait for its output.
|
|
3
|
-
*
|
|
4
|
-
* An agentic process is a deployed orchestration rather than an inline model.
|
|
5
|
-
* Its declared output fields become readable after the synchronous step.
|
|
6
|
-
*
|
|
7
|
-
* Generic scenario: ask a community-planning process for a neighborhood walk.
|
|
8
|
-
*/
|
|
9
|
-
import { flow, agenticProcess, script, input, out, types } from '@uipath/maestro-builder-sdk';
|
|
10
|
-
|
|
11
|
-
export default flow('neighborhood-walk-planner')
|
|
12
|
-
.name('NeighborhoodWalkPlanner')
|
|
13
|
-
.version('1.0.0')
|
|
14
|
-
.input({ district: types.string })
|
|
15
|
-
.output({ route: types.string })
|
|
16
|
-
.step('planWalk', agenticProcess({
|
|
17
|
-
key: '510e527f-ade6-4c92-a860-9f17657dc821',
|
|
18
|
-
name: 'Neighborhood Walk Planner',
|
|
19
|
-
folderPath: 'Shared/community-planning',
|
|
20
|
-
inputs: { District: input('district') },
|
|
21
|
-
returns: { RouteName: 'string' },
|
|
22
|
-
}))
|
|
23
|
-
.step('recordRoute', script({
|
|
24
|
-
code: 'return "route: " + String($vars.planWalk.output.RouteName);',
|
|
25
|
-
}))
|
|
26
|
-
.return({ route: out('recordRoute') })
|
|
27
|
-
.build();
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: an ERROR PORT — a failed step routes to a handler instead of
|
|
3
|
-
* killing the run.
|
|
4
|
-
*
|
|
5
|
-
* .step('fetch', http({ url: …, managed: true, returns: { … } }))
|
|
6
|
-
* .onError((h) => h.return({ … err('fetch', 'message') … }))
|
|
7
|
-
* .step('onSuccess', …) // everything after .onError is the SUCCESS path
|
|
8
|
-
*
|
|
9
|
-
* `.onError()` handles the step BEFORE it; its handler is a path of its own.
|
|
10
|
-
* `managed: true` is load-bearing: on the plain HTTP node a 4xx/5xx is a SUCCESS
|
|
11
|
-
* carrying `statusCode`, so the handler would never run (`check` rejects that).
|
|
12
|
-
* The managed node throws on non-2xx, so the failure reaches the port — and it
|
|
13
|
-
* hands back a PARSED body. Read the failure with `err('<step>', '<field>')`
|
|
14
|
-
* (siblings of `out`): `code` (a string), `message`, `detail`, `category`,
|
|
15
|
-
* `status`.
|
|
16
|
-
*
|
|
17
|
-
* Generic scenario: an observatory asks a public sun API when tonight's viewing
|
|
18
|
-
* can start, and states a fallback for when the service is unreachable.
|
|
19
|
-
*/
|
|
20
|
-
import { flow, http, script, err, out, input, lit, tmpl, types } from '@uipath/maestro-builder-sdk';
|
|
21
|
-
|
|
22
|
-
export default flow('observatory-seeing')
|
|
23
|
-
.name('ObservatorySeeing')
|
|
24
|
-
.version('1.0.0')
|
|
25
|
-
.input({ lat: types.number, lng: types.number })
|
|
26
|
-
.output({ viewingFrom: types.string, source: types.string })
|
|
27
|
-
|
|
28
|
-
// Somebody else's uptime, so the call has to ROUTE on failure.
|
|
29
|
-
.step('fetchSun', http({
|
|
30
|
-
url: tmpl`https://api.example.com/sun?lat=${input('lat')}&lng=${input('lng')}`,
|
|
31
|
-
managed: true,
|
|
32
|
-
// Declare what we read, or the read is refused.
|
|
33
|
-
returns: { results: 'object' },
|
|
34
|
-
}))
|
|
35
|
-
// Service down / rate-limited / unknown coordinates: carry on with a stated
|
|
36
|
-
// fallback rather than faulting the whole run.
|
|
37
|
-
.onError((h) => h.return({
|
|
38
|
-
viewingFrom: lit('sunset unknown — check a local almanac'),
|
|
39
|
-
source: tmpl`fallback (${err('fetchSun', 'code')}): ${err('fetchSun', 'message')}`,
|
|
40
|
-
}))
|
|
41
|
-
|
|
42
|
-
// Success path — reached only when the call actually succeeded.
|
|
43
|
-
.step('describe', script({
|
|
44
|
-
// Read the DECLARED field (`body.results`) and index it in JS; reading
|
|
45
|
-
// `body.results.sunset` through $vars would not resolve (declaration stops at
|
|
46
|
-
// `results`).
|
|
47
|
-
code: 'const r = $vars.fetchSun.output.body.results || {};\nreturn { line: "best viewing after " + (r.sunset || "sunset") };',
|
|
48
|
-
}))
|
|
49
|
-
.return({ viewingFrom: out('describe', 'line'), source: lit('live') })
|
|
50
|
-
|
|
51
|
-
.build();
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: summarize an uploaded file with the platform Summarize node.
|
|
3
|
-
*
|
|
4
|
-
* The input is the complete file attachment. The result uses the node's
|
|
5
|
-
* PascalCase `content.Text` and `content.Citations` contract.
|
|
6
|
-
*
|
|
7
|
-
* Generic scenario: condense a community oral-history interview for an archive.
|
|
8
|
-
*/
|
|
9
|
-
import { flow, summarize, out, err, tmpl, js, types } from '@uipath/maestro-builder-sdk';
|
|
10
|
-
|
|
11
|
-
export default flow('oral-history-digest')
|
|
12
|
-
.name('OralHistoryDigest')
|
|
13
|
-
.version('1.0.0')
|
|
14
|
-
.input({ interviewFile: types.file })
|
|
15
|
-
.output({ summary: types.string, citations: types.array })
|
|
16
|
-
.step('summarizeInterview', summarize({
|
|
17
|
-
attachment: out('start', 'interviewFile'),
|
|
18
|
-
prompt: 'Summarize the places, people, dates, and traditions mentioned in this interview.',
|
|
19
|
-
returnCitations: true,
|
|
20
|
-
}))
|
|
21
|
-
// The handler runs BECAUSE `summarizeInterview` failed, so its `content.*`
|
|
22
|
-
// outputs have no value — return an empty list rather than reading them.
|
|
23
|
-
.onError((handler) => handler.return({
|
|
24
|
-
summary: tmpl`could not summarize interview: ${err('summarizeInterview', 'detail')}`,
|
|
25
|
-
citations: js`[]`,
|
|
26
|
-
}))
|
|
27
|
-
.return({
|
|
28
|
-
summary: out('summarizeInterview', 'content.Text'),
|
|
29
|
-
citations: out('summarizeInterview', 'content.Citations'),
|
|
30
|
-
})
|
|
31
|
-
.build();
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: pause mid-flow until a filtered connector event arrives.
|
|
3
|
-
*
|
|
4
|
-
* `waitForEvent` is an action, not a start trigger. The injected event resumes
|
|
5
|
-
* the existing run, and its payload is readable from the wait step's output.
|
|
6
|
-
*
|
|
7
|
-
* Generic scenario: wait for the email confirming a planetarium reservation.
|
|
8
|
-
*/
|
|
9
|
-
import { flow, waitForEvent, script, out, types } from '@uipath/maestro-builder-sdk';
|
|
10
|
-
|
|
11
|
-
const CONFIRMATIONS_FOLDER =
|
|
12
|
-
'AQMkAGU5ZGFmM2QyLWY4OTEtNDAzNi04MGU2LWRjNzE2OWM0NTllMA==';
|
|
13
|
-
|
|
14
|
-
export default flow('planetarium-confirmation')
|
|
15
|
-
.name('PlanetariumConfirmation')
|
|
16
|
-
.version('1.0.0')
|
|
17
|
-
.input({ reservationCode: types.string })
|
|
18
|
-
.output({ confirmation: types.string })
|
|
19
|
-
.step('awaitConfirmation', waitForEvent({
|
|
20
|
-
connector: 'uipath-microsoft-outlook365',
|
|
21
|
-
event: 'email-received',
|
|
22
|
-
where: { parentFolderId: CONFIRMATIONS_FOLDER },
|
|
23
|
-
filters: [{ field: 'subject', contains: 'PLANETARIUM' }],
|
|
24
|
-
// bindings.json labels; both required (check: BINDING_MISSING).
|
|
25
|
-
connection: 'outlook',
|
|
26
|
-
folder: 'shared',
|
|
27
|
-
}))
|
|
28
|
-
.step('recordConfirmation', script({
|
|
29
|
-
code:
|
|
30
|
-
'return "confirmed " + $vars.start.output.reservationCode + ": "'
|
|
31
|
-
+ ' + $vars.awaitConfirmation.output.subject;',
|
|
32
|
-
}))
|
|
33
|
-
.return({ confirmation: out('recordConfirmation') })
|
|
34
|
-
.build();
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: invoke a published agent resource.
|
|
3
|
-
*
|
|
4
|
-
* Published coded and low-code agents share the same node family. The release
|
|
5
|
-
* key, name, folder, inputs, and declared returns close the deployed contract.
|
|
6
|
-
*
|
|
7
|
-
* Generic scenario: ask a botany advisor for a plant's common name.
|
|
8
|
-
*/
|
|
9
|
-
import { flow, agent, script, input, out, types } from '@uipath/maestro-builder-sdk';
|
|
10
|
-
|
|
11
|
-
export default flow('plant-name-advisor')
|
|
12
|
-
.name('PlantNameAdvisor')
|
|
13
|
-
.version('1.0.0')
|
|
14
|
-
.input({ description: types.string })
|
|
15
|
-
.output({ answer: types.string })
|
|
16
|
-
.step('identifyPlant', agent({
|
|
17
|
-
key: '9b05688c-2b3e-4b69-86e6-f1f923a264d8',
|
|
18
|
-
name: 'Plant Name Advisor',
|
|
19
|
-
folderPath: 'Shared/botany',
|
|
20
|
-
flavour: 'lowcode',
|
|
21
|
-
inputs: { description: input('description') },
|
|
22
|
-
returns: { commonName: 'string' },
|
|
23
|
-
}))
|
|
24
|
-
.step('recordName', script({
|
|
25
|
-
code: 'return "plant: " + String($vars.identifyPlant.output.commonName);',
|
|
26
|
-
}))
|
|
27
|
-
.return({ answer: out('recordName') })
|
|
28
|
-
.build();
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: an `inlineAgent` — an LLM step defined in this project, with a
|
|
3
|
-
* typed output contract.
|
|
4
|
-
*
|
|
5
|
-
* systemPrompt / userPrompt : the instruction and the turn (use `{{input.x}}`)
|
|
6
|
-
* inputs : values wired into the prompt from the flow
|
|
7
|
-
* returns : the TYPED object the agent must produce — read
|
|
8
|
-
* downstream as `$vars.<step>.output.<field>`
|
|
9
|
-
*
|
|
10
|
-
* A local run cannot call the model, so a `--dry-run` returns `{}` and the reads
|
|
11
|
-
* below are genuinely absent offline — which is the honest bar: a green run
|
|
12
|
-
* proves the agent node is WIRED and its contract is declared, not that the model
|
|
13
|
-
* answered. This one carries no tools or escalation (those are the agent-resource
|
|
14
|
-
* family); it is the plain shape.
|
|
15
|
-
*
|
|
16
|
-
* Generic scenario: draft a short caption for a travel postcard.
|
|
17
|
-
*/
|
|
18
|
-
import { flow, inlineAgent, script, out, input, types } from '@uipath/maestro-builder-sdk';
|
|
19
|
-
|
|
20
|
-
export default flow('postcard-caption')
|
|
21
|
-
.name('PostcardCaption')
|
|
22
|
-
.version('1.0.0')
|
|
23
|
-
.input({ place: types.string, mood: types.string })
|
|
24
|
-
.output({ caption: types.string })
|
|
25
|
-
|
|
26
|
-
.step('write', inlineAgent({
|
|
27
|
-
model: 'gpt-5.4',
|
|
28
|
-
systemPrompt:
|
|
29
|
-
'You write postcard captions for a given place and mood. Return a result '
|
|
30
|
-
+ 'conforming to the output schema. caption: one cheerful sentence, no more '
|
|
31
|
-
+ 'than 15 words. tone: one word.',
|
|
32
|
-
userPrompt: 'Place: {{input.place}}\nMood: {{input.mood}}',
|
|
33
|
-
inputs: { place: input('place'), mood: input('mood') },
|
|
34
|
-
returns: { caption: 'string', tone: 'string' },
|
|
35
|
-
}))
|
|
36
|
-
|
|
37
|
-
// Reads only the agent's own declared returns — the one contract a local run
|
|
38
|
-
// can honestly assert.
|
|
39
|
-
.step('render', script({
|
|
40
|
-
code: 'return "[" + String($vars.write.output.tone) + "] " + String($vars.write.output.caption);',
|
|
41
|
-
}))
|
|
42
|
-
.return({ caption: out('render') })
|
|
43
|
-
|
|
44
|
-
.build();
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: place a phone call, talk to the person, hang up.
|
|
3
|
-
*
|
|
4
|
-
* The call is identified by a `callContext` OBJECT. Pass the WHOLE thing —
|
|
5
|
-
* `out('dial', 'callContext')` — never a field inside it. The node's schema
|
|
6
|
-
* types that field as `object`, so a scalar such as
|
|
7
|
-
* `out('dial', 'callContext.conversationId')` passes the file's schema and then
|
|
8
|
-
* fails at dispatch; `check` catches it as `VOICE_CALL_CONTEXT_NOT_OBJECT`.
|
|
9
|
-
*
|
|
10
|
-
* `createOutgoingCall` dials out and publishes the context. An inbound flow
|
|
11
|
-
* instead uses `.trigger(voiceTrigger())`, whose start step publishes the same
|
|
12
|
-
* `callContext`. A persona belongs to its voice model, and `maxIterations` is
|
|
13
|
-
* capped at 8.
|
|
14
|
-
*
|
|
15
|
-
* Generic scenario: remind a customer their pottery is ready for collection.
|
|
16
|
-
*/
|
|
17
|
-
import {
|
|
18
|
-
flow, createOutgoingCall, voiceAgent, endCall, input, out, types,
|
|
19
|
-
} from '@uipath/maestro-builder-sdk';
|
|
20
|
-
|
|
21
|
-
export default flow('pottery-studio-callback')
|
|
22
|
-
.name('PotteryStudioCallback')
|
|
23
|
-
.version('1.0.0')
|
|
24
|
-
.input({ customerName: types.string, customerPhone: types.string, pieceCount: types.number })
|
|
25
|
-
.output({ callSummary: types.string })
|
|
26
|
-
.step('dial', createOutgoingCall({
|
|
27
|
-
from: '+15550001111',
|
|
28
|
-
to: input('customerPhone'),
|
|
29
|
-
}))
|
|
30
|
-
.step('talk', voiceAgent({
|
|
31
|
-
systemPrompt:
|
|
32
|
-
'Tell {{input.customerName}} that {{input.pieceCount}} finished pieces are ready '
|
|
33
|
-
+ 'for collection, and offer a weekday or weekend pickup.',
|
|
34
|
-
inputs: { customerName: input('customerName'), pieceCount: input('pieceCount') },
|
|
35
|
-
callContext: out('dial', 'callContext'),
|
|
36
|
-
voice: { model: 'gemini-3.1-flash-live-preview', persona: 'Kore' },
|
|
37
|
-
maxIterations: 4,
|
|
38
|
-
}))
|
|
39
|
-
.step('hangUp', endCall({ callContext: out('dial', 'callContext') }))
|
|
40
|
-
.return({ callSummary: out('talk') })
|
|
41
|
-
.build();
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: `subflow` — a flow that runs OTHER flows.
|
|
3
|
-
*
|
|
4
|
-
* A `subflow` step hands work to a CHILD flow and reads back what the child
|
|
5
|
-
* returns. Two scopes, one door: the child sees nothing of its caller — inputs
|
|
6
|
-
* arrive through the `subflow(child, { … })` map (keyed by the child's own input
|
|
7
|
-
* names) and results leave through the child's `.return()`.
|
|
8
|
-
*
|
|
9
|
-
* - A child is declared as a `flow(...)` WITHOUT `.build()`, ABOVE its callers.
|
|
10
|
-
* - Read a subflow's output BY NAME: `out('step', 'field')`, never bare
|
|
11
|
-
* `out('step')` (a subflow publishes an OBJECT of its declared outputs).
|
|
12
|
-
* - Children nest: a child may itself run a subflow.
|
|
13
|
-
*
|
|
14
|
-
* Generic scenario: scale a recipe's ingredients by a factor, with a nested
|
|
15
|
-
* child that phrases one line. No `.input`: variable defaults keep it
|
|
16
|
-
* self-contained.
|
|
17
|
-
*/
|
|
18
|
-
import { flow, script, subflow, v, out, input, types } from '@uipath/maestro-builder-sdk';
|
|
19
|
-
|
|
20
|
-
/** A leaf child: scale one quantity. Declared ABOVE the flows that run it. */
|
|
21
|
-
const scaleIngredient = flow('scale-ingredient')
|
|
22
|
-
.name('ScaleIngredient')
|
|
23
|
-
.input({ grams: types.number, factor: types.number })
|
|
24
|
-
.output({ scaled: types.number })
|
|
25
|
-
.step('scale', script({ code: 'return Math.round($vars.start.output.grams * $vars.start.output.factor);' }))
|
|
26
|
-
.return({ scaled: out('scale') });
|
|
27
|
-
|
|
28
|
-
/** A child that itself runs a subflow — the nesting case. */
|
|
29
|
-
const describeBatch = flow('describe-batch')
|
|
30
|
-
.name('DescribeBatch')
|
|
31
|
-
.input({ grams: types.number, factor: types.number, label: types.string })
|
|
32
|
-
.output({ line: types.string })
|
|
33
|
-
.step('scaleLabelled', subflow(scaleIngredient, { grams: input('grams'), factor: input('factor') }))
|
|
34
|
-
.step('phrase', script({
|
|
35
|
-
code: 'return $vars.start.output.label + ": " + $vars.scaleLabelled.output.scaled + " g";',
|
|
36
|
-
}))
|
|
37
|
-
.return({ line: out('phrase') });
|
|
38
|
-
|
|
39
|
-
export default flow('recipe-scaler')
|
|
40
|
-
.name('RecipeScaler')
|
|
41
|
-
.version('1.0.0')
|
|
42
|
-
.output({ flour: types.number, sugar: types.number, headline: types.string })
|
|
43
|
-
|
|
44
|
-
.var('factor', types.number, 2.5)
|
|
45
|
-
.var('flourBase', types.number, 200)
|
|
46
|
-
.var('sugarBase', types.number, 120)
|
|
47
|
-
.var('flourLabel', types.string, 'flour')
|
|
48
|
-
|
|
49
|
-
// The same child, twice — nothing shared but its definition.
|
|
50
|
-
.step('scaleFlour', subflow(scaleIngredient, { grams: v('flourBase'), factor: v('factor') }))
|
|
51
|
-
.step('scaleSugar', subflow(scaleIngredient, { grams: v('sugarBase'), factor: v('factor') }))
|
|
52
|
-
|
|
53
|
-
// A child that nests one level deeper.
|
|
54
|
-
.step('headline', subflow(describeBatch, { grams: v('flourBase'), factor: v('factor'), label: v('flourLabel') }))
|
|
55
|
-
|
|
56
|
-
.return({
|
|
57
|
-
flour: out('scaleFlour', 'scaled'),
|
|
58
|
-
sugar: out('scaleSugar', 'scaled'),
|
|
59
|
-
headline: out('headline', 'line'),
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
.build();
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CAPABILITY: classify a document, then extract fields against an INLINE schema.
|
|
3
|
-
*
|
|
4
|
-
* `documentClassify` (`uipath.document.classify`) names the document's type.
|
|
5
|
-
* `dynamicExtract` (`uipath.ixp.extract-document-builder`) is the other half of
|
|
6
|
-
* the pair: it carries its own `schema` instead of a published IxP project's
|
|
7
|
-
* trained fields, which is what makes it "dynamic".
|
|
8
|
-
*
|
|
9
|
-
* Dynamic Extract still needs a model DEPLOYMENT identity. `modelName` and
|
|
10
|
-
* `folderKey` below are placeholders in the shape the tenant serves — copy the
|
|
11
|
-
* real pair from the tenant; never construct them.
|
|
12
|
-
*
|
|
13
|
-
* Generic scenario: read the sowing details off a scanned seed packet.
|
|
14
|
-
*/
|
|
15
|
-
import { flow, documentClassify, dynamicExtract, script, out, types } from '@uipath/maestro-builder-sdk';
|
|
16
|
-
|
|
17
|
-
export default flow('seed-packet-reader')
|
|
18
|
-
.name('SeedPacketReader')
|
|
19
|
-
.version('1.0.0')
|
|
20
|
-
.input({ packetScan: types.file })
|
|
21
|
-
.output({ summary: types.string })
|
|
22
|
-
.step('classifyPacket', documentClassify({
|
|
23
|
-
fileRef: out('start', 'packetScan'),
|
|
24
|
-
splitPages: false,
|
|
25
|
-
}))
|
|
26
|
-
.step('extractSowing', dynamicExtract({
|
|
27
|
-
fileRef: out('start', 'packetScan'),
|
|
28
|
-
schema: {
|
|
29
|
-
type: 'object',
|
|
30
|
-
properties: {
|
|
31
|
-
variety: { type: 'string' },
|
|
32
|
-
sowDepthMm: { type: 'string' },
|
|
33
|
-
daysToGerminate: { type: 'string' },
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
model: {
|
|
37
|
-
modelName: 'seedpackets-9c41e7b2-ixp',
|
|
38
|
-
folderKey: '4c9d1f70-6b2e-4a58-9f13-2ad5c8e0b741',
|
|
39
|
-
},
|
|
40
|
-
}))
|
|
41
|
-
.step('summarize', script({
|
|
42
|
-
code:
|
|
43
|
-
'const sowing = $vars.extractSowing.output || {};\n'
|
|
44
|
-
+ 'return "type:" + ($vars.classifyPacket.output.DocumentTypeName || "?")\n'
|
|
45
|
-
+ ' + " variety:" + (sowing.variety || "-")\n'
|
|
46
|
-
+ ' + " depth:" + (sowing.sowDepthMm || "-");',
|
|
47
|
-
}))
|
|
48
|
-
.return({ summary: out('summarize') })
|
|
49
|
-
.build();
|