@uipath/maestro-builder-sdk 6.20.2 → 6.20.4
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 +3 -3
- package/dist/api-members.md +9 -9
- package/dist/check.js +54 -23
- package/dist/core/subflow-start.d.ts +6 -0
- package/dist/core/subflow-start.js +6 -0
- package/dist/decompile.js +15 -6
- package/dist/flow-sdk.d.ts +2 -0
- package/dist/flow-sdk.js +2 -0
- package/dist/serialize.d.ts +20 -0
- package/dist/serialize.js +54 -20
- package/package.json +2 -2
package/dist/api-index.md
CHANGED
|
@@ -128,11 +128,11 @@ could hand you spans for a version you do not have.
|
|
|
128
128
|
| `FilterCondition` | type | `dist/nodes/transform/flow/spec.d.ts:10-11` | Supporting types | Comparison a filter rule applies to a field. |
|
|
129
129
|
| `FilterMatch` | type | `dist/nodes/transform/flow/spec.d.ts:8-9` | Supporting types | How a filter combines its rules: every rule must match, or any one. |
|
|
130
130
|
| `FilterRule` | interface | `dist/nodes/transform/flow/spec.d.ts:12-24` | Supporting types | 3 field(s) |
|
|
131
|
-
| `flow` | function | `dist/flow-sdk.d.ts:
|
|
131
|
+
| `flow` | function | `dist/flow-sdk.d.ts:1475-1490` | Flow construction | Start building a flow with the given id. |
|
|
132
132
|
| `FlowAction` | class | `dist/core/node-classes.d.ts:162-168` | Supporting types | A node placed as a step — pass an instance to `.step(name, …)`. |
|
|
133
133
|
| `FlowActionSpec` | type | `dist/flow-sdk.d.ts:48-49` | Supporting types | What `.step()` accepts here: the shared actions plus this SDK's subflow. |
|
|
134
134
|
| `FlowActionSpecs` | interface | `dist/core/actions.d.ts:1995-2104` | Supporting types | Every action kind, keyed by kind, to the body of its spec — the arm's fields other than `kind`. |
|
|
135
|
-
| `FlowBuilder` | class | `dist/flow-sdk.d.ts:1203-
|
|
135
|
+
| `FlowBuilder` | class | `dist/flow-sdk.d.ts:1203-1474` | Builders | 13 member(s) |
|
|
136
136
|
| `FlowLayout` | interface | `dist/flow-sdk.d.ts:671-684` | Supporting types | Designer layout for a flow, keyed by AUTHOR-level ids: node entries by step name (plus the trigger id and `end`), edge… |
|
|
137
137
|
| `FlowNode` | class | `dist/core/node-classes.d.ts:126-161` | Supporting types | The abstract root of every definition-backed node the builder can place. |
|
|
138
138
|
| `FlowResource` | class | `dist/core/node-classes.d.ts:176-183` | Supporting types | A node attached to another semantic node — an inline agent's tool, context, memory, or escalation. |
|
|
@@ -229,7 +229,7 @@ could hand you spans for a version you do not have.
|
|
|
229
229
|
| `STICKY_NOTE_COLORS` | const | `dist/flow-sdk.d.ts:624-629` | Flow construction | The designer's sticky-note palette. |
|
|
230
230
|
| `StickyNote` | interface | `dist/flow-sdk.d.ts:636-670` | Supporting types | A canvas sticky note — free text pinned to the diagram, for the humans reading it. |
|
|
231
231
|
| `StickyNoteColor` | type | `dist/flow-sdk.d.ts:630-635` | Supporting types | A sticky note's swatch. |
|
|
232
|
-
| `subflow` | function | `dist/flow-sdk.d.ts:
|
|
232
|
+
| `subflow` | function | `dist/flow-sdk.d.ts:1491-1530` | Flow construction | Run another flow as one step, and read back what it returns. |
|
|
233
233
|
| `SubflowSpec` | interface | `dist/flow-sdk.d.ts:40-47` | Supporting types | A step that runs a child flow. |
|
|
234
234
|
| `summarize` | function | `dist/core/actions.d.ts:2202-2242` | Actions | Summarize a document with citations — the platform's **Summarize** node. |
|
|
235
235
|
| `SummarizeInputs` | interface | `dist/core/actions.d.ts:674-706` | Option shapes | 3 field(s) |
|
package/dist/api-members.md
CHANGED
|
@@ -104,7 +104,7 @@ not find it either.
|
|
|
104
104
|
| `breakEnabled` | property | `LoopOptions` | `dist/flow-sdk.d.ts:458-462` |
|
|
105
105
|
| `build` | method | `BpmnBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3483-3488` |
|
|
106
106
|
| `build` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1269-1274` |
|
|
107
|
-
| `build` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:
|
|
107
|
+
| `build` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1467-1473` |
|
|
108
108
|
| `businessRule` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2527-2573` |
|
|
109
109
|
| `by` | property | `LookupResolution` | `dist/core/lookups.d.ts:164` |
|
|
110
110
|
| `by` | property | `LookupSpec` | `dist/core/lookups.d.ts:27-28` |
|
|
@@ -289,7 +289,7 @@ not find it either.
|
|
|
289
289
|
| `entity` | property | `DataServiceOpts` | `dist/bpmn/bpmn-sdk.d.ts:1090-1091` |
|
|
290
290
|
| `entry` | property | `BuiltStage` | `dist/case/case-sdk.d.ts:528` |
|
|
291
291
|
| `entry` | property | `BuiltTask` | `dist/case/case-sdk.d.ts:520` |
|
|
292
|
-
| `entryPoint` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:
|
|
292
|
+
| `entryPoint` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1293-1343` |
|
|
293
293
|
| `entryPointId` | property | `ProcessMetadata` | `dist/bpmn/bpmn-sdk.d.ts:534-539` |
|
|
294
294
|
| `entryPoints` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:724-725` |
|
|
295
295
|
| `entryWhen` | method | `StageBuilder` | `dist/case/case-sdk.d.ts:1004-1011` |
|
|
@@ -459,7 +459,7 @@ not find it either.
|
|
|
459
459
|
| `inclusiveGateway` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2266-2273` |
|
|
460
460
|
| `inlineAgent` | property | `FlowActionSpecs` | `dist/core/actions.d.ts:2063-2066` |
|
|
461
461
|
| `input` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1160-1185` |
|
|
462
|
-
| `input` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:
|
|
462
|
+
| `input` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1418-1430` |
|
|
463
463
|
| `input` | property | `HumanTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1355-1356` |
|
|
464
464
|
| `input` | property | `OrchestratorOpts` | `dist/bpmn/bpmn-sdk.d.ts:1241-1242` |
|
|
465
465
|
| `input` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3068-3076` |
|
|
@@ -725,7 +725,7 @@ not find it either.
|
|
|
725
725
|
| `outcomes` | property | `EscalationRef` | `dist/core/actions.d.ts:1871-1876` |
|
|
726
726
|
| `outcomes` | property | `HitlInputs` | `dist/core/actions.d.ts:445-459` |
|
|
727
727
|
| `output` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1186-1198` |
|
|
728
|
-
| `output` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:
|
|
728
|
+
| `output` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1431-1456` |
|
|
729
729
|
| `output` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:90` |
|
|
730
730
|
| `output` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3077-3085` |
|
|
731
731
|
| `outputColumns` | property | `BatchTransformInputs` | `dist/core/actions.d.ts:722-726` |
|
|
@@ -901,7 +901,7 @@ not find it either.
|
|
|
901
901
|
| `schemaVersion` | method | `BpmnBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3375-3404` |
|
|
902
902
|
| `schemaVersion` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:704-710` |
|
|
903
903
|
| `schemaVersion` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1068-1094` |
|
|
904
|
-
| `schemaVersion` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:
|
|
904
|
+
| `schemaVersion` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1378-1417` |
|
|
905
905
|
| `scope` | property | `EscalationRecipient` | `dist/case/case-sdk.d.ts:121` |
|
|
906
906
|
| `scopes` | property | `GuardrailSelector` | `dist/core/actions.d.ts:1177` |
|
|
907
907
|
| `script` | property | `FlowActionSpecs` | `dist/nodes/script/flow/spec.d.ts:47-50` |
|
|
@@ -1044,11 +1044,11 @@ not find it either.
|
|
|
1044
1044
|
| `trigger` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:715-717` |
|
|
1045
1045
|
| `trigger` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1224-1232` |
|
|
1046
1046
|
| `trigger` | property | `EscalationOpts` | `dist/case/case-sdk.d.ts:128-129` |
|
|
1047
|
-
| `trigger` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1272-
|
|
1047
|
+
| `trigger` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1272-1292` |
|
|
1048
1048
|
| `trigger` | property | `StartOpts` | `dist/bpmn/bpmn-sdk.d.ts:624-671` |
|
|
1049
1049
|
| `triggeredByEvent` | property | `SubProcessOpts` | `dist/bpmn/bpmn-sdk.d.ts:976-977` |
|
|
1050
1050
|
| `triggerId` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:726-732` |
|
|
1051
|
-
| `triggerId` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:
|
|
1051
|
+
| `triggerId` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1344-1363` |
|
|
1052
1052
|
| `triggerOptions` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:718-719` |
|
|
1053
1053
|
| `triggers` | property | `BuiltCase` | `dist/case/case-sdk.d.ts:644-645` |
|
|
1054
1054
|
| `triggers` | property | `CaseLayout` | `dist/case/case-sdk.d.ts:620-621` |
|
|
@@ -1104,7 +1104,7 @@ not find it either.
|
|
|
1104
1104
|
| `value` | property | `TypedInputRow` | `dist/bpmn/typed-node.d.ts:205-206` |
|
|
1105
1105
|
| `values` | property | `DataFabricCreateInputs` | `dist/nodes/data-fabric/flow/spec.d.ts:132-137` |
|
|
1106
1106
|
| `var` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1199-1223` |
|
|
1107
|
-
| `var` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:
|
|
1107
|
+
| `var` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1457-1466` |
|
|
1108
1108
|
| `var` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3059-3067` |
|
|
1109
1109
|
| `var` | property | `TaskOutputBinding` | `dist/case/case-sdk.d.ts:494-495` |
|
|
1110
1110
|
| `var` | property | `TypedOutputRow` | `dist/bpmn/typed-node.d.ts:251-252` |
|
|
@@ -1127,7 +1127,7 @@ not find it either.
|
|
|
1127
1127
|
| `version` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:1708-1709` |
|
|
1128
1128
|
| `version` | property | `EventSubscription` | `dist/core/actions.d.ts:2933` |
|
|
1129
1129
|
| `version` | property | `ExternalTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1507-1508` |
|
|
1130
|
-
| `version` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:
|
|
1130
|
+
| `version` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1364-1377` |
|
|
1131
1131
|
| `version` | property | `NodeOptions` | `dist/flow-sdk.d.ts:368-375` |
|
|
1132
1132
|
| `version` | property | `TriggerMeta` | `dist/core/connectors.d.ts:126` |
|
|
1133
1133
|
| `version` | property | `TriggerOptions` | `dist/core/actions.d.ts:2890-2891` |
|
package/dist/check.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Expr, SCHEDULE_PRESETS, parseIxpProjectType, flatNameOf, flatNameSegmen
|
|
|
9
9
|
import { FlowNode } from './core/node-classes.js';
|
|
10
10
|
import { planContributionBindings } from './core/contribution-bindings.js';
|
|
11
11
|
import { definitionHasErrorPort, errorPortRefusal } from './core/error-port.js';
|
|
12
|
-
import { bundledActionNodeType, bundledDefinition, resolveContributionDefinition } from './serialize.js';
|
|
12
|
+
import { bundledActionNodeType, bundledDefinition, perCallDefinition, resolveContributionDefinition } from './serialize.js';
|
|
13
13
|
import { sdkFormFieldType } from './core/form-field-type.js';
|
|
14
14
|
import { QUEUE_ITEM_RECORD_SCHEMA } from './core/queue-record.js';
|
|
15
15
|
import { AGENTIC_PROCESS_FORMS } from './core/agentic-process-forms.js';
|
|
@@ -1512,10 +1512,14 @@ function checkSubflow(step, child, inputs, parent, ancestors, diags) {
|
|
|
1512
1512
|
return;
|
|
1513
1513
|
}
|
|
1514
1514
|
// A subflow always starts manually — its caller is what starts it. Nothing
|
|
1515
|
-
// schedules a subflow, so a schedule here is silently ignored.
|
|
1516
|
-
|
|
1515
|
+
// schedules a subflow, so a schedule here is silently ignored. `manual()` is
|
|
1516
|
+
// what the child gets anyway, so `.trigger(manual(), { label, version })` is
|
|
1517
|
+
// allowed: it is how the child's start node is labelled (#1050), and the
|
|
1518
|
+
// form decompile writes for a renamed one.
|
|
1519
|
+
if (child.trigger !== undefined && child.trigger.kind !== 'manual') {
|
|
1517
1520
|
at('SUBFLOW_CHILD_TRIGGER', `Subflow "${step}" runs a flow with its own \`.trigger(…)\`. A subflow is started by its caller, never by a `
|
|
1518
|
-
+ `trigger of its own — the schedule would be dropped. Remove the .trigger() from "${child.id}"
|
|
1521
|
+
+ `trigger of its own — the schedule would be dropped. Remove the .trigger() from "${child.id}" `
|
|
1522
|
+
+ `(\`.trigger(manual(), { label })\` is allowed, to name the child's start node).`);
|
|
1519
1523
|
}
|
|
1520
1524
|
// `{ shared }` merges one input across a flow's ROOTS (#924). A subflow has
|
|
1521
1525
|
// one root, its caller, so there is nothing to merge; serialize refuses it.
|
|
@@ -4952,25 +4956,31 @@ function collectActionExprs(s, out, errorSource) {
|
|
|
4952
4956
|
}
|
|
4953
4957
|
}
|
|
4954
4958
|
/**
|
|
4955
|
-
* The families
|
|
4956
|
-
*
|
|
4957
|
-
*
|
|
4958
|
-
* `agenticProcessDef` / `agentDef` / `ixpExtractDef` set
|
|
4959
|
-
* `supportsErrorHandling: true`; Integration Service connector activities
|
|
4960
|
-
* declare the `error` handle).
|
|
4959
|
+
* The families with no definition this SDK can ask, and an error port anyway:
|
|
4960
|
+
* an Integration Service connector activity's definition comes from the
|
|
4961
|
+
* connector library, and every connector activity declares the `error` handle.
|
|
4961
4962
|
*
|
|
4962
|
-
* Every family
|
|
4963
|
-
* that definition (`bundledActionNodeType` + `definitionHasErrorPort`), so a
|
|
4964
|
-
* family cannot drift from its definition again (#1011: `documentClassify` was
|
|
4965
|
-
* missing here although `uipath.document.classify@1.0` sets the flag).
|
|
4963
|
+
* Every other family is decided by a definition, never by a list:
|
|
4966
4964
|
*
|
|
4967
|
-
*
|
|
4968
|
-
*
|
|
4969
|
-
*
|
|
4965
|
+
* - a bundled family by its bundled definition (`bundledActionNodeType` +
|
|
4966
|
+
* `bundledDefinition`, #1011: `documentClassify` was missing from the old
|
|
4967
|
+
* list although `uipath.document.classify@1.0` sets the flag);
|
|
4968
|
+
* - a per-tenant family (`rpaWorkflow`, `apiWorkflow`, `agenticProcess`,
|
|
4969
|
+
* `publishedFunction`, `agent`, `ixpExtract`) by the definition serialize
|
|
4970
|
+
* synthesizes for it (`perCallDefinition`, #1040: `publishedFunction` was
|
|
4971
|
+
* refused here although `publishedFunctionDef` sets the flag).
|
|
4972
|
+
*
|
|
4973
|
+
* `publishedFunction`'s flag is measured, not assumed: on 2026-10-08 four
|
|
4974
|
+
* `flow debug` jobs on alpha/codereval called `acme-echo` with a non-string
|
|
4975
|
+
* `message` (null, object, number, array). In each, the function job failed
|
|
4976
|
+
* (`Python.FUNCTION_EXECUTION_ERROR`, category User, status 502), the node's
|
|
4977
|
+
* error boundary fired, and the handler's `err('message')` read
|
|
4978
|
+
* "Failure in the Orchestrator Job".
|
|
4979
|
+
*
|
|
4980
|
+
* A kind in none of these (`waitEvent`) has no error port: an event wait
|
|
4981
|
+
* resumes or does not.
|
|
4970
4982
|
*/
|
|
4971
|
-
const
|
|
4972
|
-
'connector', 'rpaWorkflow', 'apiWorkflow', 'agenticProcess', 'agent', 'ixpExtract',
|
|
4973
|
-
]);
|
|
4983
|
+
const NO_DEFINITION_ERROR_PORT_KINDS = new Set(['connector']);
|
|
4974
4984
|
/**
|
|
4975
4985
|
* The ONERROR_NO_ERROR_PORT sentence for a typed step — a built-in family or a
|
|
4976
4986
|
* registered node type — whose node type has no error port. One spelling for
|
|
@@ -5084,9 +5094,30 @@ placed) {
|
|
|
5084
5094
|
// no definition here to ask; version resolution reports that, not this check.
|
|
5085
5095
|
const bundledType = bundledActionNodeType(spec);
|
|
5086
5096
|
const bundledDef = bundledType ? bundledDefinition(bundledType, step.options?.version) : undefined;
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5097
|
+
// A per-tenant family: ask the definition serialize synthesizes for it (#1040).
|
|
5098
|
+
let perCallDef;
|
|
5099
|
+
if (!bundledType) {
|
|
5100
|
+
try {
|
|
5101
|
+
perCallDef = perCallDefinition(spec);
|
|
5102
|
+
}
|
|
5103
|
+
catch {
|
|
5104
|
+
// The family's own checks report a spec its builder cannot lower.
|
|
5105
|
+
return;
|
|
5106
|
+
}
|
|
5107
|
+
}
|
|
5108
|
+
const def = bundledType ? bundledDef : perCallDef;
|
|
5109
|
+
const noPort = def !== undefined
|
|
5110
|
+
? !definitionHasErrorPort(def)
|
|
5111
|
+
: !bundledType && !NO_DEFINITION_ERROR_PORT_KINDS.has(spec.kind);
|
|
5112
|
+
if (noPort && perCallDef !== undefined) {
|
|
5113
|
+
diags.push({
|
|
5114
|
+
level: 'error',
|
|
5115
|
+
code: 'ONERROR_NO_ERROR_PORT',
|
|
5116
|
+
message: errorPortRefusal(step.name, perCallDef, { bundled: true }),
|
|
5117
|
+
step: step.name,
|
|
5118
|
+
});
|
|
5119
|
+
return;
|
|
5120
|
+
}
|
|
5090
5121
|
if (noPort) {
|
|
5091
5122
|
diags.push({
|
|
5092
5123
|
level: 'error',
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A subflow child's start-node label when the author sets none: `Start`, what
|
|
3
|
+
* Studio Web writes (the vendored golden `shared/sample-flows/new.flow`,
|
|
4
|
+
* `subflow1Start`). It is not the manual trigger definition's `Manual trigger`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SUBFLOW_START_LABEL = "Start";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A subflow child's start-node label when the author sets none: `Start`, what
|
|
3
|
+
* Studio Web writes (the vendored golden `shared/sample-flows/new.flow`,
|
|
4
|
+
* `subflow1Start`). It is not the manual trigger definition's `Manual trigger`.
|
|
5
|
+
*/
|
|
6
|
+
export const SUBFLOW_START_LABEL = 'Start';
|
package/dist/decompile.js
CHANGED
|
@@ -33,6 +33,7 @@ import { preserveSchemaVersion } from './schema-version.js';
|
|
|
33
33
|
import { BUNDLED_DEFINITIONS, bundledVersions } from './flow-definitions.js';
|
|
34
34
|
import { DEFAULT_TRIGGER_ID, Expr } from './core/expr.js';
|
|
35
35
|
import { FLOW_NODE_TYPES } from './flow-node-registry.js';
|
|
36
|
+
import { SUBFLOW_START_LABEL } from './core/subflow-start.js';
|
|
36
37
|
import { commentText } from './core/comment-text.js';
|
|
37
38
|
import { tsLiteral, tsNumber, tsText } from './core/ts-literal.js';
|
|
38
39
|
import { contextIndexSlug, parseContextIndexType } from './core/context-index.js';
|
|
@@ -163,18 +164,22 @@ function verArg(node) {
|
|
|
163
164
|
}
|
|
164
165
|
/**
|
|
165
166
|
* A trigger node's option clauses: its exact `version`, and its canvas `label`
|
|
166
|
-
* when that differs from the
|
|
167
|
+
* when that differs from `defaultLabel` (the label serialize writes when the
|
|
168
|
+
* author sets none).
|
|
167
169
|
*/
|
|
168
|
-
function triggerOptParts(node) {
|
|
170
|
+
function triggerOptParts(node, defaultLabel = definitionLabel(node)) {
|
|
169
171
|
const parts = [];
|
|
170
172
|
const ver = verClause(node);
|
|
171
173
|
if (ver)
|
|
172
174
|
parts.push(ver);
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
parts.push(`label: ${tsLiteral(label)}`);
|
|
175
|
+
if (hasRenamedLabel(node, defaultLabel))
|
|
176
|
+
parts.push(`label: ${tsLiteral(node.display.label)}`);
|
|
176
177
|
return parts;
|
|
177
178
|
}
|
|
179
|
+
function hasRenamedLabel(node, defaultLabel) {
|
|
180
|
+
const label = node.display?.label;
|
|
181
|
+
return typeof label === 'string' && label !== defaultLabel;
|
|
182
|
+
}
|
|
178
183
|
/** `triggerOptParts` as the `.trigger(spec, { ... })` options argument. */
|
|
179
184
|
function triggerOptsArg(node) {
|
|
180
185
|
const parts = triggerOptParts(node);
|
|
@@ -3073,7 +3078,8 @@ function emitSubflow(node, ctx) {
|
|
|
3073
3078
|
/**
|
|
3074
3079
|
* Render a child (sub)flow body as a nested `flow(name)…` builder expression
|
|
3075
3080
|
* (parenthesized, no `.build()`). Reuses the same region machinery on the child's
|
|
3076
|
-
* own scope; the child's trigger is its `<caller>Start` node
|
|
3081
|
+
* own scope; the child's trigger is its `<caller>Start` node, written as
|
|
3082
|
+
* `.trigger(manual(), { label })` only when its label is not `SUBFLOW_START_LABEL`.
|
|
3077
3083
|
*/
|
|
3078
3084
|
function emitChildFlow(name, child, ctx) {
|
|
3079
3085
|
const globals = readFlowGlobals(child.variables, runStrict);
|
|
@@ -3098,6 +3104,9 @@ function emitChildFlow(name, child, ctx) {
|
|
|
3098
3104
|
}
|
|
3099
3105
|
// Body: the child's trigger is its own manual Start; walk from its successor.
|
|
3100
3106
|
const trigger = (child.nodes ?? []).find((n) => isTrigger(n.type) && !(child.edges ?? []).some((e) => e.targetNodeId === n.id));
|
|
3107
|
+
if (trigger?.type === T.triggerManual && hasRenamedLabel(trigger, SUBFLOW_START_LABEL)) {
|
|
3108
|
+
parts.push(`.trigger(${ctx.imp.use('manual')}(), { ${triggerOptParts(trigger, SUBFLOW_START_LABEL).join(', ')} })`);
|
|
3109
|
+
}
|
|
3101
3110
|
const scope = scopeIds(child.nodes ?? [], undefined);
|
|
3102
3111
|
const entries = trigger ? scopeSuccEdges(childCtx.graph, trigger.id, scope) : [];
|
|
3103
3112
|
const ipdom = entries.length
|
package/dist/flow-sdk.d.ts
CHANGED
|
@@ -1284,6 +1284,8 @@ declare class FlowBuilder extends StepList {
|
|
|
1284
1284
|
* @param options - Node options; `version` selects the exact definition
|
|
1285
1285
|
* version and `label` sets what the canvas shows on the trigger node
|
|
1286
1286
|
* (default: the trigger definition's label, e.g. `Scheduled trigger`). See {@link NodeOptions}.
|
|
1287
|
+
* On a flow run as a `subflow(...)`, only `manual()` is allowed — its caller
|
|
1288
|
+
* starts it — and `label` names the child's start node (default: `Start`).
|
|
1287
1289
|
* @returns This builder, so calls chain.
|
|
1288
1290
|
* @defaultValue the manual trigger
|
|
1289
1291
|
*/
|
package/dist/flow-sdk.js
CHANGED
|
@@ -976,6 +976,8 @@ class FlowBuilder extends StepList {
|
|
|
976
976
|
* @param options - Node options; `version` selects the exact definition
|
|
977
977
|
* version and `label` sets what the canvas shows on the trigger node
|
|
978
978
|
* (default: the trigger definition's label, e.g. `Scheduled trigger`). See {@link NodeOptions}.
|
|
979
|
+
* On a flow run as a `subflow(...)`, only `manual()` is allowed — its caller
|
|
980
|
+
* starts it — and `label` names the child's start node (default: `Start`).
|
|
979
981
|
* @returns This builder, so calls chain.
|
|
980
982
|
* @defaultValue the manual trigger
|
|
981
983
|
*/
|
package/dist/serialize.d.ts
CHANGED
|
@@ -102,6 +102,26 @@ export declare function bundledActionNodeType(spec: {
|
|
|
102
102
|
kind?: string;
|
|
103
103
|
inputs?: any;
|
|
104
104
|
} | undefined): string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* The definition serialize synthesizes for a family that has no bundled one:
|
|
107
|
+
* a published process resource (`rpaWorkflow`, `apiWorkflow`,
|
|
108
|
+
* `agenticProcess`, `publishedFunction`, `agent`) or an `ixpExtract` step.
|
|
109
|
+
* Their node type carries a tenant's key, so the SDK builds the definition
|
|
110
|
+
* per call, transcribed from what `registry get` returns. `undefined` for
|
|
111
|
+
* every other kind (a bundled family, a connector, a container).
|
|
112
|
+
*
|
|
113
|
+
* The emit path builds its definition here, and `check` asks this same
|
|
114
|
+
* definition whether the node has an error port (#1040), so the two cannot
|
|
115
|
+
* disagree. For instance `publishedFunction(...)` yields
|
|
116
|
+
* `uipath.core.function.<key>@1.0.0` with `supportsErrorHandling: true`.
|
|
117
|
+
*
|
|
118
|
+
* Throws what the family's builder throws for an unusable spec (an
|
|
119
|
+
* `ixpExtract` project that is not a node type).
|
|
120
|
+
*/
|
|
121
|
+
export declare function perCallDefinition(spec: {
|
|
122
|
+
kind?: string;
|
|
123
|
+
inputs?: any;
|
|
124
|
+
} | undefined): any | undefined;
|
|
105
125
|
/**
|
|
106
126
|
* The bundled definition of `nodeType` that `makeNode` resolves: the author's
|
|
107
127
|
* exact `{ version }` when given, otherwise the pinned default (the first
|
package/dist/serialize.js
CHANGED
|
@@ -60,6 +60,7 @@ import { QUEUE_ITEM_RECORD_SCHEMA } from './core/queue-record.js';
|
|
|
60
60
|
import { AGENTIC_PROCESS_FORMS } from './core/agentic-process-forms.js';
|
|
61
61
|
import { resourceNodeSortOrder } from './core/process-resource-sort-order.js';
|
|
62
62
|
import { types } from './core/expr.js';
|
|
63
|
+
import { SUBFLOW_START_LABEL } from './core/subflow-start.js';
|
|
63
64
|
import { ownEntry } from './core/own-entry.js';
|
|
64
65
|
import { jsonClone } from './core/json-file.js';
|
|
65
66
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
@@ -3793,6 +3794,48 @@ export function bundledActionNodeType(spec) {
|
|
|
3793
3794
|
default: return undefined;
|
|
3794
3795
|
}
|
|
3795
3796
|
}
|
|
3797
|
+
/**
|
|
3798
|
+
* The definition serialize synthesizes for a family that has no bundled one:
|
|
3799
|
+
* a published process resource (`rpaWorkflow`, `apiWorkflow`,
|
|
3800
|
+
* `agenticProcess`, `publishedFunction`, `agent`) or an `ixpExtract` step.
|
|
3801
|
+
* Their node type carries a tenant's key, so the SDK builds the definition
|
|
3802
|
+
* per call, transcribed from what `registry get` returns. `undefined` for
|
|
3803
|
+
* every other kind (a bundled family, a connector, a container).
|
|
3804
|
+
*
|
|
3805
|
+
* The emit path builds its definition here, and `check` asks this same
|
|
3806
|
+
* definition whether the node has an error port (#1040), so the two cannot
|
|
3807
|
+
* disagree. For instance `publishedFunction(...)` yields
|
|
3808
|
+
* `uipath.core.function.<key>@1.0.0` with `supportsErrorHandling: true`.
|
|
3809
|
+
*
|
|
3810
|
+
* Throws what the family's builder throws for an unusable spec (an
|
|
3811
|
+
* `ixpExtract` project that is not a node type).
|
|
3812
|
+
*/
|
|
3813
|
+
export function perCallDefinition(spec) {
|
|
3814
|
+
const s = spec?.inputs ?? {};
|
|
3815
|
+
switch (spec?.kind) {
|
|
3816
|
+
case 'publishedFunction':
|
|
3817
|
+
return publishedFunctionDef({ key: s.key, name: s.name, folderPath: s.folderPath, inputs: s.inputs ?? {}, returns: s.returns });
|
|
3818
|
+
case 'apiWorkflow':
|
|
3819
|
+
return apiWorkflowDef({ key: s.key, name: s.name, folderPath: s.folderPath, inputs: s.inputs ?? {}, returns: s.returns });
|
|
3820
|
+
case 'agenticProcess':
|
|
3821
|
+
return agenticProcessDef({
|
|
3822
|
+
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
3823
|
+
inputs: s.inputs ?? {}, returns: s.returns, form: s.form,
|
|
3824
|
+
});
|
|
3825
|
+
case 'rpaWorkflow':
|
|
3826
|
+
return rpaWorkflowDef({
|
|
3827
|
+
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
3828
|
+
inputs: s.inputs ?? {}, returns: s.returns,
|
|
3829
|
+
});
|
|
3830
|
+
case 'agent':
|
|
3831
|
+
return agentDef({
|
|
3832
|
+
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
3833
|
+
inputs: s.inputs ?? {}, returns: s.returns, flavour: s.flavour,
|
|
3834
|
+
});
|
|
3835
|
+
case 'ixpExtract': return ixpExtractDef(s);
|
|
3836
|
+
default: return undefined;
|
|
3837
|
+
}
|
|
3838
|
+
}
|
|
3796
3839
|
/**
|
|
3797
3840
|
* The bundled definition of `nodeType` that `makeNode` resolves: the author's
|
|
3798
3841
|
* exact `{ version }` when given, otherwise the pinned default (the first
|
|
@@ -4829,7 +4872,9 @@ export function serialize(built, opts = {}) {
|
|
|
4829
4872
|
*
|
|
4830
4873
|
* The child gets its own manual Start node (a subflow always starts manually
|
|
4831
4874
|
* — nothing schedules a subflow; its caller is the trigger) and its own
|
|
4832
|
-
* variables.
|
|
4875
|
+
* variables. A child's `.trigger(manual(), { label, version })` sets that
|
|
4876
|
+
* node's canvas label and exact version; `check` refuses any other kind.
|
|
4877
|
+
* Every `in` variable carries `triggerNodeId` pointing at that
|
|
4833
4878
|
* Start: it is what binds the caller's value, and omitting it is the single
|
|
4834
4879
|
* defect that makes a subflow validate clean and then fault at run time with
|
|
4835
4880
|
* a null. It is emitted here, always, so it cannot be forgotten.
|
|
@@ -4858,7 +4903,10 @@ export function serialize(built, opts = {}) {
|
|
|
4858
4903
|
// Without this a child that reads its own input points at a node that does
|
|
4859
4904
|
// not exist in its scope.
|
|
4860
4905
|
scope.rename.nodeIds.set('start', [startId]);
|
|
4861
|
-
|
|
4906
|
+
// The child's `.trigger(manual(), { label })`, else `SUBFLOW_START_LABEL`.
|
|
4907
|
+
const start = makeNode(NODE_TYPE.trigger, startId, child.triggerOptions?.label ?? SUBFLOW_START_LABEL, {
|
|
4908
|
+
requestedVersion: child.triggerOptions?.version,
|
|
4909
|
+
});
|
|
4862
4910
|
start.inputs = {};
|
|
4863
4911
|
scope.nodes.push(start);
|
|
4864
4912
|
const tails = emit(child.steps, [{ node: startId, port: 'output' }], scope);
|
|
@@ -5267,10 +5315,7 @@ export function serialize(built, opts = {}) {
|
|
|
5267
5315
|
// because `inputs` is required here (the empty-input floor — see
|
|
5268
5316
|
// `AgentInputs.inputs`) and because the emitted binding subtype is `Agent`.
|
|
5269
5317
|
const s = spec.inputs;
|
|
5270
|
-
const def =
|
|
5271
|
-
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
5272
|
-
inputs: s.inputs, returns: s.returns, flavour: s.flavour,
|
|
5273
|
-
});
|
|
5318
|
+
const def = perCallDefinition(spec);
|
|
5274
5319
|
// The pair's key and folder come off the definition, as for rpa / agentic
|
|
5275
5320
|
// steps: one place decides the in-solution shape.
|
|
5276
5321
|
const pairFolder = def.model.bindings.values.find((v) => v.name === 'folderPath').default;
|
|
@@ -5842,19 +5887,8 @@ export function serialize(built, opts = {}) {
|
|
|
5842
5887
|
const s = spec.inputs;
|
|
5843
5888
|
const nodeInputs = s.inputs ?? {};
|
|
5844
5889
|
const fireAndForget = spec.kind === 'agenticProcess' && spec.inputs.completion === 'fire-and-forget';
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
: spec.kind === 'apiWorkflow'
|
|
5848
|
-
? apiWorkflowDef({ key: spec.inputs.key, name: s.name, folderPath: spec.inputs.folderPath, inputs: nodeInputs, returns: spec.inputs.returns })
|
|
5849
|
-
: spec.kind === 'agenticProcess'
|
|
5850
|
-
? agenticProcessDef({
|
|
5851
|
-
key: spec.inputs.key, name: s.name, folderPath: s.folderPath, location: spec.inputs.location,
|
|
5852
|
-
projectId: spec.inputs.projectId, inputs: nodeInputs, returns: spec.inputs.returns, form: spec.inputs.form,
|
|
5853
|
-
})
|
|
5854
|
-
: rpaWorkflowDef({
|
|
5855
|
-
key: spec.inputs.key, name: s.name, folderPath: s.folderPath, location: spec.inputs.location,
|
|
5856
|
-
projectId: spec.inputs.projectId, inputs: nodeInputs, returns: spec.inputs.returns,
|
|
5857
|
-
});
|
|
5890
|
+
// The same definition `check` asks about the error port.
|
|
5891
|
+
const def = perCallDefinition(spec);
|
|
5858
5892
|
// The bindings first: two steps on the same process share ONE pair, and the
|
|
5859
5893
|
// definition's `model.context` names ids that have to exist.
|
|
5860
5894
|
// Read off the definition: one kind carries several subtypes (agenticProcess by `form`).
|
|
@@ -6155,7 +6189,7 @@ export function serialize(built, opts = {}) {
|
|
|
6155
6189
|
}
|
|
6156
6190
|
if (spec.kind === 'ixpExtract') {
|
|
6157
6191
|
const s = spec.inputs;
|
|
6158
|
-
const def =
|
|
6192
|
+
const def = perCallDefinition(spec); // ixpExtractDef: throws on an unparseable project
|
|
6159
6193
|
const { versionId } = parseIxpProjectType(s.project); // ixpExtractDef threw if it could not parse
|
|
6160
6194
|
// The bindings first: two steps on the same project share ONE pair, and
|
|
6161
6195
|
// the definition's `model.bindings.resourceKey` names the key they hang off.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.20.
|
|
3
|
+
"version": "6.20.4",
|
|
4
4
|
"description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.uipath.com/maestro",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"@types/node": "^22.7.0",
|
|
93
93
|
"esbuild": "^0.28.1"
|
|
94
94
|
},
|
|
95
|
-
"gitref": "
|
|
95
|
+
"gitref": "7dcc7ebc0420e1fca8be0368269c8f20ff60eff6"
|
|
96
96
|
}
|