@uipath/maestro-builder-sdk 6.40.1 → 6.41.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/dist/api-index.md +101 -101
- package/dist/api-members.md +292 -292
- package/dist/check.js +8 -487
- package/dist/core/actions.d.ts +0 -391
- package/dist/core/actions.js +0 -167
- package/dist/core/nodes/registry.d.ts +6 -1
- package/dist/core/nodes/registry.js +32 -2
- package/dist/core/nodes/versioned.d.ts +12 -0
- package/dist/core/nodes/versioned.js +7 -2
- package/dist/core/process-resource.d.ts +102 -0
- package/dist/core/process-resource.js +118 -0
- package/dist/core/step-ports.d.ts +1 -1
- package/dist/core/step-ports.js +1 -1
- package/dist/decompile.js +9 -10
- package/dist/flow-node-registry.js +2 -1
- package/dist/flow-sdk.d.ts +1 -0
- package/dist/flow-sdk.js +1 -0
- package/dist/flow-step-exits.js +2 -2
- package/dist/nodes/process/flow/check.d.ts +112 -0
- package/dist/nodes/process/flow/check.js +444 -0
- package/dist/nodes/process/flow/factories.d.ts +158 -0
- package/dist/nodes/process/flow/factories.js +173 -0
- package/dist/nodes/process/flow/family.d.ts +3 -0
- package/dist/nodes/process/flow/family.js +8 -0
- package/dist/nodes/process/flow/index.d.ts +3 -0
- package/dist/nodes/process/flow/index.js +3 -0
- package/dist/nodes/process/flow/node-type.d.ts +23 -0
- package/dist/nodes/process/flow/node-type.js +652 -0
- package/dist/nodes/process/flow/spec.d.ts +255 -0
- package/dist/nodes/process/flow/spec.js +1 -0
- package/dist/serialize.js +41 -612
- package/package.json +2 -2
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The process factories — `rpaWorkflow()`, `apiWorkflow()`, `publishedFunction()`
|
|
3
|
+
* and `agenticProcess()`. Moved from core/actions.ts in Phase 4 of
|
|
4
|
+
* docs/NODE_TYPE_ARCHITECTURE_DESIGN.md; the package entry re-exports them.
|
|
5
|
+
*/
|
|
6
|
+
import { builtinActionSpec } from '../../../core/actions.js';
|
|
7
|
+
/**
|
|
8
|
+
* Invoke a deployed RPA (robotic process automation) workflow — a classic
|
|
9
|
+
* UI-automation process, published to Orchestrator, run by a robot.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* Three fields identify the process and they all come from the tenant, which is
|
|
13
|
+
* why they are named exactly as the platform names them:
|
|
14
|
+
*
|
|
15
|
+
* key the published process's release key (a GUID). It becomes part of
|
|
16
|
+
* the node's TYPE — `uipath.core.rpa-workflow.<key>` — so the
|
|
17
|
+
* platform can tell one process's node from another's.
|
|
18
|
+
* name the process's name in Orchestrator.
|
|
19
|
+
* folderPath the Orchestrator folder it lives in.
|
|
20
|
+
*
|
|
21
|
+
* `name` + `folderPath` are what the robot is actually started by (the runtime
|
|
22
|
+
* re-resolves the release from them), and together they are also the process's
|
|
23
|
+
* `resourceKey`: `"<folderPath>.<name>"`. The serializer emits the two of them
|
|
24
|
+
* as the flow's process bindings and points the node at them, because a
|
|
25
|
+
* bindings entry the node does not reference is not a bound process.
|
|
26
|
+
*
|
|
27
|
+
* `inputs` are the PROCESS's own input arguments — whatever it declares, by its
|
|
28
|
+
* own argument names. They are not a fixed schema.
|
|
29
|
+
*
|
|
30
|
+
* The step publishes whatever the process returns, under `output`: read a field
|
|
31
|
+
* with `out('<step>', '<field>')`. Nothing local can check that an argument name
|
|
32
|
+
* or a returned field name matches the deployed process — only the robot knows —
|
|
33
|
+
* so a wrong name shows up as a faulted job on a live run, not at compile time.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* **Start a deployed process and read what it returns**
|
|
37
|
+
* ```ts
|
|
38
|
+
* .step('getTitle', rpaWorkflow({
|
|
39
|
+
* key: '486edc26-0658-4ac1-92c9-1ef953927151',
|
|
40
|
+
* name: 'RPA Workflow',
|
|
41
|
+
* folderPath: 'Shared/uipath-maestro-flow/ProjectEuler RPA',
|
|
42
|
+
* inputs: { problemId: 123 },
|
|
43
|
+
* }))
|
|
44
|
+
* .return({ title: out('getTitle', 'title') })
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @param inputs - The published process to start (`key`, `name`, `folderPath`),
|
|
48
|
+
* its `inputs`, and the output fields you read back via `returns`.
|
|
49
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
50
|
+
*/
|
|
51
|
+
export function rpaWorkflow(inputs) {
|
|
52
|
+
return builtinActionSpec({ kind: 'rpaWorkflow', inputs });
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Invoke a deployed API workflow — a coded workflow published to Orchestrator,
|
|
56
|
+
* run as a serverless job rather than by a robot.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* The same three identifiers as `rpaWorkflow`, for the same reason: `key` is
|
|
60
|
+
* the key the node's TYPE carries (`uipath.core.api-workflow.<key>`), while
|
|
61
|
+
* `name` + `folderPath` are what the runtime resolves the job by — and together
|
|
62
|
+
* they are the workflow's `resourceKey`, `"<folderPath>.<name>"`. The serializer
|
|
63
|
+
* emits those two as the flow's process bindings and points the node at them.
|
|
64
|
+
*
|
|
65
|
+
* The step publishes the job's output arguments under `output`, so
|
|
66
|
+
* `out('<step>', '<field>')` reads one of the fields `returns` declares. Whether
|
|
67
|
+
* an argument name or a returned field actually matches the deployed workflow is
|
|
68
|
+
* something only the tenant knows — a wrong one is a faulted job on a live run,
|
|
69
|
+
* not a compile error.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* **Start an API workflow and read a declared output argument**
|
|
73
|
+
* ```ts
|
|
74
|
+
* .step('getAge', apiWorkflow({
|
|
75
|
+
* key: 'ce857908-ee1d-4392-b552-38bcea0be29c',
|
|
76
|
+
* name: 'NameToAgeFixed',
|
|
77
|
+
* folderPath: 'Shared',
|
|
78
|
+
* inputs: { name: 'tomasz' },
|
|
79
|
+
* returns: { EstimatedAge: 'integer' },
|
|
80
|
+
* }))
|
|
81
|
+
* .return({ age: out('getAge', 'EstimatedAge') })
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* @param inputs - The published API workflow to start (`key`, `name`,
|
|
85
|
+
* `folderPath`), its `inputs`, and the fields you read back via `returns`.
|
|
86
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
87
|
+
*/
|
|
88
|
+
export function apiWorkflow(inputs) {
|
|
89
|
+
return builtinActionSpec({ kind: 'apiWorkflow', inputs });
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Invoke a published Orchestrator **Function** — a deployed unit of code run as
|
|
93
|
+
* one step (`uipath.core.function.<key>`, dispatched as
|
|
94
|
+
* `Orchestrator.ExecuteFunctionAsync`).
|
|
95
|
+
*
|
|
96
|
+
* ```ts
|
|
97
|
+
* .step('echo', publishedFunction({
|
|
98
|
+
* key: '7059bdb5-fdd7-4e13-9d7b-1748aaeb129d',
|
|
99
|
+
* name: 'acme-echo',
|
|
100
|
+
* folderPath: 'Shared/acme-echo',
|
|
101
|
+
* inputs: { message: 'hello' },
|
|
102
|
+
* returns: { echoed: 'string' },
|
|
103
|
+
* }))
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* The node type carries the key, so the function must already exist on the
|
|
107
|
+
* tenant — read `key`, `name` and `folderPath` from the registry rather than
|
|
108
|
+
* constructing them. Like the other published families, the resource identity
|
|
109
|
+
* is CLOSED by a binding pair (`<folderPath>.<name>`), and two steps on the
|
|
110
|
+
* same function share one pair.
|
|
111
|
+
*
|
|
112
|
+
* @param inputs - The function's identity, its arguments, and what it returns.
|
|
113
|
+
* @returns An action spec to pass to `.step(...)`.
|
|
114
|
+
*/
|
|
115
|
+
export function publishedFunction(inputs) {
|
|
116
|
+
return builtinActionSpec({ kind: 'publishedFunction', inputs });
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Invoke a deployed AGENTIC PROCESS — a Maestro process orchestration published to
|
|
120
|
+
* Orchestrator: a BPMN process that coordinates agents, robots and people, started
|
|
121
|
+
* as a job the same way an RPA or API workflow is.
|
|
122
|
+
*
|
|
123
|
+
* @remarks
|
|
124
|
+
* The same three identifiers as `rpaWorkflow` and `apiWorkflow`, for the same
|
|
125
|
+
* reason: `key` is the key the node's TYPE carries
|
|
126
|
+
* (`uipath.core.agentic-process.<key>`), while `name` + `folderPath` are what
|
|
127
|
+
* the runtime resolves the job by — and together they are the process's
|
|
128
|
+
* `resourceKey`, `"<folderPath>.<name>"`. The serializer emits those two as the
|
|
129
|
+
* flow's process bindings and points the node at them.
|
|
130
|
+
*
|
|
131
|
+
* By default the step WAITS for the process and publishes its output arguments
|
|
132
|
+
* under `output`, so `out('<step>', '<field>')` reads one of the fields
|
|
133
|
+
* `returns` declares.
|
|
134
|
+
*
|
|
135
|
+
* `completion: 'fire-and-forget'` selects the designer's own async switch
|
|
136
|
+
* instead: the node's service type becomes `Orchestrator.Start…ProcessAsync`
|
|
137
|
+
* and it publishes no output but `error`. The type is a discriminated union, so
|
|
138
|
+
* `returns` is impossible in that form and nothing downstream can read one; a
|
|
139
|
+
* local run dispatches without waiting and yields `{ jobKey, started: true }`.
|
|
140
|
+
*
|
|
141
|
+
* `form` picks which published Agentic Process this is — `'bpmn'` (the default,
|
|
142
|
+
* a Maestro process orchestration), `'flow'` (a published Maestro Flow), or
|
|
143
|
+
* `'case'` (a Case Management process). They share one public concept and
|
|
144
|
+
* differ only in wire identity.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* **Start a Maestro process and wait for its result**
|
|
148
|
+
* ```ts
|
|
149
|
+
* .step('runIntake', agenticProcess({
|
|
150
|
+
* key: '4fc450ab-89be-4462-8fc8-21ac4c1d6fb9',
|
|
151
|
+
* name: 'ProcurementProcess',
|
|
152
|
+
* folderPath: 'Shared/uipath-agents/ProcurementProcess',
|
|
153
|
+
* inputs: { productId: 1 },
|
|
154
|
+
* returns: { status: 'boolean' },
|
|
155
|
+
* }))
|
|
156
|
+
* .return({ ok: out('runIntake', 'status') })
|
|
157
|
+
* ```
|
|
158
|
+
*
|
|
159
|
+
* @param inputs - The published Maestro process to start (`key`, `name`,
|
|
160
|
+
* `folderPath`), its `inputs`, and the fields you read back via `returns`.
|
|
161
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
162
|
+
*/
|
|
163
|
+
export function agenticProcess(inputs) {
|
|
164
|
+
// Types are erased at run time, so the discriminated union alone cannot stop
|
|
165
|
+
// `{ completion: 'fire-and-forget', returns: {...} }` arriving from untyped
|
|
166
|
+
// code — and silently dropping the returns would validate a read that can
|
|
167
|
+
// never be satisfied.
|
|
168
|
+
if (inputs.completion === 'fire-and-forget' && inputs.returns !== undefined) {
|
|
169
|
+
throw new Error("agenticProcess(): completion 'fire-and-forget' publishes no output — remove `returns`, "
|
|
170
|
+
+ "or use completion: 'wait' to read the process result.");
|
|
171
|
+
}
|
|
172
|
+
return builtinActionSpec({ kind: 'agenticProcess', inputs });
|
|
173
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ProcessResourceDef } from '../../../core/process-resource.js';
|
|
2
|
+
import type { FlowVersionedNodeType } from '../../../flow-node-type.js';
|
|
3
|
+
import type { AgenticProcessInputs, ApiWorkflowInputs, PublishedFunctionInputs, RpaWorkflowInputs } from './spec.js';
|
|
4
|
+
type ProcessSpec = {
|
|
5
|
+
kind: 'rpaWorkflow';
|
|
6
|
+
inputs: RpaWorkflowInputs;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'apiWorkflow';
|
|
9
|
+
inputs: ApiWorkflowInputs;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'publishedFunction';
|
|
12
|
+
inputs: PublishedFunctionInputs;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'agenticProcess';
|
|
15
|
+
inputs: AgenticProcessInputs;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The definition a process step's node is emitted against — what serialize
|
|
19
|
+
* supplies and what `errorPort` asks, so the two cannot disagree (#1040).
|
|
20
|
+
*/
|
|
21
|
+
export declare function processDefinition(spec: ProcessSpec): ProcessResourceDef;
|
|
22
|
+
export declare const processNodeTypes: FlowVersionedNodeType<ProcessSpec>[];
|
|
23
|
+
export {};
|