@uipath/maestro-builder-sdk 6.124.5 → 6.124.7
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 +45 -45
- package/dist/api-members.md +198 -198
- package/dist/bpmn/bpmn-sdk.d.ts +6 -20
- package/dist/bpmn/bpmn-sdk.js +1 -2
- package/dist/bpmn/registry-types.json +26 -14
- package/dist/bpmn/typed-node.d.ts +0 -8
- package/dist/bpmn-api.md +3 -3
- package/dist/registry/library-build/context.d.ts +7 -6
- package/dist/registry/library-build/context.js +15 -11
- package/dist/registry/library-build/enrich.js +2 -0
- package/dist/registry/prepare/failed-describe.d.ts +3 -0
- package/dist/registry/prepare/failed-describe.js +26 -0
- package/dist/registry/prepare/messages.d.ts +11 -0
- package/dist/registry/prepare/messages.js +29 -0
- package/dist/registry/prepare/pipeline.js +3 -0
- package/package.json +2 -2
package/dist/bpmn/bpmn-sdk.d.ts
CHANGED
|
@@ -1543,16 +1543,9 @@ export interface OrchestratorOpts extends ActivityOpts {
|
|
|
1543
1543
|
* The local engine does not bind `result` yet (it binds the job's output under
|
|
1544
1544
|
* `response`, and a local `*Async` start returns none), so on a local run this row
|
|
1545
1545
|
* reads `undefined`; the platform reads it.
|
|
1546
|
-
*
|
|
1547
|
-
* Needed for the same reason `.humanTask()` has it: this family declares a TYPED output
|
|
1548
|
-
* (`type="Orchestrator.RunJob"` and friends) with no `source`, which the designer resolves
|
|
1549
|
-
* into sub-fields but the local engine cannot — so the variable stays `undefined` on a local
|
|
1550
|
-
* run and nothing downstream can read or branch on it. An explicit row maps one field the
|
|
1551
|
-
* way every other output row works. The spec's own row is still emitted, so the artifact
|
|
1552
|
-
* stays what the platform expects.
|
|
1553
1546
|
*/
|
|
1554
1547
|
outputs?: Record<string, string>;
|
|
1555
|
-
/** Variable
|
|
1548
|
+
/** Variable every output argument lands in (`=result`). Defaults to `<id>_processResponse`. */
|
|
1556
1549
|
outputVar?: string;
|
|
1557
1550
|
/** `=`-expression that skips the invocation when truthy. */
|
|
1558
1551
|
skipCondition?: string;
|
|
@@ -1595,16 +1588,9 @@ export interface QueueItemOpts extends ActivityOpts {
|
|
|
1595
1588
|
* `vars.response.Output["OutputString"]`). The local engine does not bind `result`
|
|
1596
1589
|
* yet and flattens `Output` into the item, so on a local run this row reads
|
|
1597
1590
|
* `undefined`; the platform reads it.
|
|
1598
|
-
*
|
|
1599
|
-
* Needed for the same reason `.humanTask()` has it: this family declares a TYPED output
|
|
1600
|
-
* (`type="Orchestrator.RunJob"` and friends) with no `source`, which the designer resolves
|
|
1601
|
-
* into sub-fields but the local engine cannot — so the variable stays `undefined` on a local
|
|
1602
|
-
* run and nothing downstream can read or branch on it. An explicit row maps one field the
|
|
1603
|
-
* way every other output row works. The spec's own row is still emitted, so the artifact
|
|
1604
|
-
* stays what the platform expects.
|
|
1605
1591
|
*/
|
|
1606
1592
|
outputs?: Record<string, string>;
|
|
1607
|
-
/** Variable the
|
|
1593
|
+
/** Variable the whole result lands in (`=result`). Defaults to `<id>_response`. */
|
|
1608
1594
|
outputVar?: string;
|
|
1609
1595
|
/** `=`-expression that skips the enqueue when truthy. */
|
|
1610
1596
|
skipCondition?: string;
|
|
@@ -1620,8 +1606,8 @@ export interface HumanTaskCommonOpts extends ActivityOpts {
|
|
|
1620
1606
|
* `{ decision: '=Action' }`.
|
|
1621
1607
|
*
|
|
1622
1608
|
* Worth setting whenever a gateway branches on the outcome. The type's own
|
|
1623
|
-
* output row is typed (`type="Actions.HITL"`,
|
|
1624
|
-
*
|
|
1609
|
+
* output row is typed (`type="Actions.HITL"`, `source="=result"`), which the platform
|
|
1610
|
+
* fills but the local runtime leaves `undefined` — so without a mapped field
|
|
1625
1611
|
* here, a local run cannot branch on the decision at all. `=Action` is the field
|
|
1626
1612
|
* the runtime's own outcome routing reads.
|
|
1627
1613
|
*/
|
|
@@ -1666,7 +1652,7 @@ export interface HumanTaskAppOpts extends HumanTaskCommonOpts {
|
|
|
1666
1652
|
form?: never;
|
|
1667
1653
|
/** Data the task shows the human — the node's `HitlTaskArguments`. */
|
|
1668
1654
|
input?: Record<string, unknown>;
|
|
1669
|
-
/** Variable the whole
|
|
1655
|
+
/** Variable the task's whole result lands in (`=result`). Defaults to `<id>_processResponse`. */
|
|
1670
1656
|
outputVar?: string;
|
|
1671
1657
|
/**
|
|
1672
1658
|
* Removed (#2144): a v1 `appId`-task field the V2 engine never reads. The app defines
|
|
@@ -1754,7 +1740,7 @@ export interface ReceiveMessageOpts extends ActivityOpts {
|
|
|
1754
1740
|
* [error] Maestro.ReceiveMessageEvent output type must be "Maestro.ReceiveMessageEvent".
|
|
1755
1741
|
*
|
|
1756
1742
|
* Which is not derivable from the registry — `Actions.HITL` declares a
|
|
1757
|
-
* structurally IDENTICAL output (a typed row,
|
|
1743
|
+
* structurally IDENTICAL output (a typed row, `source="=result"`) and accepts a mapped
|
|
1758
1744
|
* second row happily, which is the whole basis of offline approval routing. So
|
|
1759
1745
|
* the constraint is recorded in `REGISTRY_GAPS` rather than inferred, and this
|
|
1760
1746
|
* option simply does not exist. Read the message with `outputVar` and an
|
package/dist/bpmn/bpmn-sdk.js
CHANGED
|
@@ -1826,8 +1826,7 @@ class ScopeBuilder {
|
|
|
1826
1826
|
const o = opts;
|
|
1827
1827
|
// The app variant's fields have no meaning on an inline form: the form IS what the
|
|
1828
1828
|
// human sees (`input`), and there is no app to look up (`folder`).
|
|
1829
|
-
// Nor does `outputVar`: the app task's whole-response row
|
|
1830
|
-
// quick form never fills, so there is nothing to name.
|
|
1829
|
+
// Nor does `outputVar`: a quick form never fills the app task's whole-response row.
|
|
1831
1830
|
const appOnly = ['folder', 'input', 'outputVar'].filter((k) => given[k] !== undefined);
|
|
1832
1831
|
if (appOnly.length) {
|
|
1833
1832
|
throw new CompileRefusal('BPMN_HUMAN_TASK_APP_FIELDS_ON_FORM', `humanTask "${id}": ${appOnly.join(', ')} belong to an app-backed task. On an inline form, put what the human sees in form.fields` +
|
|
@@ -9,7 +9,19 @@
|
|
|
9
9
|
"typeCount": 51,
|
|
10
10
|
"uipVersion": "1.205.0-preview.256",
|
|
11
11
|
"refreshed": {
|
|
12
|
-
"Actions.HITL": "uipath-cli@
|
|
12
|
+
"Actions.HITL": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
13
|
+
"A2A.AgentExecution": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
14
|
+
"Maestro.ReceiveMessageEvent": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
15
|
+
"Maestro.SendMessageEvent": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
16
|
+
"Orchestrator.CreateAndWaitForQueueItem": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
17
|
+
"Orchestrator.CreateQueueItem": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
18
|
+
"Orchestrator.ExecuteApiWorkflowAsync": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
19
|
+
"Orchestrator.ExecuteFunctionAsync": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
20
|
+
"Orchestrator.StartAgentJob": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
21
|
+
"Orchestrator.StartAgenticProcess": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
22
|
+
"Orchestrator.StartCaseMgmtProcess": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
23
|
+
"Orchestrator.StartFlowProcess": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0",
|
|
24
|
+
"Orchestrator.StartJob": "uipath-cli@d098f3393 bpmn-spec.json 1.1.0"
|
|
13
25
|
}
|
|
14
26
|
},
|
|
15
27
|
"types": {
|
|
@@ -70,7 +82,7 @@
|
|
|
70
82
|
"output": {
|
|
71
83
|
"name": "a2aResponse",
|
|
72
84
|
"type": "A2A.AgentExecution",
|
|
73
|
-
"source":
|
|
85
|
+
"source": "=result",
|
|
74
86
|
"relative": true
|
|
75
87
|
},
|
|
76
88
|
"eventDefinition": null,
|
|
@@ -134,7 +146,7 @@
|
|
|
134
146
|
"output": {
|
|
135
147
|
"name": "Process response",
|
|
136
148
|
"type": "Actions.HITL",
|
|
137
|
-
"source":
|
|
149
|
+
"source": "=result",
|
|
138
150
|
"relative": true
|
|
139
151
|
},
|
|
140
152
|
"eventDefinition": null,
|
|
@@ -1679,7 +1691,7 @@
|
|
|
1679
1691
|
"output": {
|
|
1680
1692
|
"name": "response",
|
|
1681
1693
|
"type": "Maestro.ReceiveMessageEvent",
|
|
1682
|
-
"source":
|
|
1694
|
+
"source": "=result",
|
|
1683
1695
|
"relative": true
|
|
1684
1696
|
},
|
|
1685
1697
|
"eventDefinition": "bpmn:messageEventDefinition",
|
|
@@ -1816,7 +1828,7 @@
|
|
|
1816
1828
|
"output": {
|
|
1817
1829
|
"name": "response",
|
|
1818
1830
|
"type": "Maestro.SendMessageEvent",
|
|
1819
|
-
"source":
|
|
1831
|
+
"source": "=result",
|
|
1820
1832
|
"relative": true
|
|
1821
1833
|
},
|
|
1822
1834
|
"eventDefinition": "bpmn:messageEventDefinition",
|
|
@@ -2074,7 +2086,7 @@
|
|
|
2074
2086
|
"output": {
|
|
2075
2087
|
"name": "response",
|
|
2076
2088
|
"type": "Orchestrator.CreateQueueItem",
|
|
2077
|
-
"source":
|
|
2089
|
+
"source": "=result",
|
|
2078
2090
|
"relative": true
|
|
2079
2091
|
},
|
|
2080
2092
|
"eventDefinition": null,
|
|
@@ -2134,7 +2146,7 @@
|
|
|
2134
2146
|
"output": {
|
|
2135
2147
|
"name": "response",
|
|
2136
2148
|
"type": "Orchestrator.CreateQueueItem",
|
|
2137
|
-
"source":
|
|
2149
|
+
"source": "=result",
|
|
2138
2150
|
"relative": true
|
|
2139
2151
|
},
|
|
2140
2152
|
"eventDefinition": null,
|
|
@@ -2250,7 +2262,7 @@
|
|
|
2250
2262
|
"output": {
|
|
2251
2263
|
"name": "Process response",
|
|
2252
2264
|
"type": "Orchestrator.RunJob",
|
|
2253
|
-
"source":
|
|
2265
|
+
"source": "=result",
|
|
2254
2266
|
"relative": true
|
|
2255
2267
|
},
|
|
2256
2268
|
"eventDefinition": null,
|
|
@@ -2320,7 +2332,7 @@
|
|
|
2320
2332
|
"output": {
|
|
2321
2333
|
"name": "Process response",
|
|
2322
2334
|
"type": "Orchestrator.RunJob",
|
|
2323
|
-
"source":
|
|
2335
|
+
"source": "=result",
|
|
2324
2336
|
"relative": true
|
|
2325
2337
|
},
|
|
2326
2338
|
"eventDefinition": null,
|
|
@@ -2763,7 +2775,7 @@
|
|
|
2763
2775
|
"output": {
|
|
2764
2776
|
"name": "Process response",
|
|
2765
2777
|
"type": "Orchestrator.RunJob",
|
|
2766
|
-
"source":
|
|
2778
|
+
"source": "=result",
|
|
2767
2779
|
"relative": true
|
|
2768
2780
|
},
|
|
2769
2781
|
"eventDefinition": null,
|
|
@@ -2833,7 +2845,7 @@
|
|
|
2833
2845
|
"output": {
|
|
2834
2846
|
"name": "Process response",
|
|
2835
2847
|
"type": "Orchestrator.RunJob",
|
|
2836
|
-
"source":
|
|
2848
|
+
"source": "=result",
|
|
2837
2849
|
"relative": true
|
|
2838
2850
|
},
|
|
2839
2851
|
"eventDefinition": null,
|
|
@@ -2968,7 +2980,7 @@
|
|
|
2968
2980
|
"output": {
|
|
2969
2981
|
"name": "Process response",
|
|
2970
2982
|
"type": "Orchestrator.RunJob",
|
|
2971
|
-
"source":
|
|
2983
|
+
"source": "=result",
|
|
2972
2984
|
"relative": true
|
|
2973
2985
|
},
|
|
2974
2986
|
"eventDefinition": null,
|
|
@@ -3103,7 +3115,7 @@
|
|
|
3103
3115
|
"output": {
|
|
3104
3116
|
"name": "Process response",
|
|
3105
3117
|
"type": "Orchestrator.RunJob",
|
|
3106
|
-
"source":
|
|
3118
|
+
"source": "=result",
|
|
3107
3119
|
"relative": true
|
|
3108
3120
|
},
|
|
3109
3121
|
"eventDefinition": null,
|
|
@@ -3238,7 +3250,7 @@
|
|
|
3238
3250
|
"output": {
|
|
3239
3251
|
"name": "Process response",
|
|
3240
3252
|
"type": "Orchestrator.RunJob",
|
|
3241
|
-
"source":
|
|
3253
|
+
"source": "=result",
|
|
3242
3254
|
"relative": true
|
|
3243
3255
|
},
|
|
3244
3256
|
"eventDefinition": null,
|
|
@@ -363,14 +363,6 @@ export interface TypedNodeInput {
|
|
|
363
363
|
/**
|
|
364
364
|
* EXTRA output rows: variable id → `=`-expression read against the node's own
|
|
365
365
|
* result, e.g. `{ decision: '=Action' }`.
|
|
366
|
-
*
|
|
367
|
-
* Why this exists: several types declare a TYPED output — `Actions.HITL` writes
|
|
368
|
-
* `type="Actions.HITL"` with no `source` — which the designer resolves into
|
|
369
|
-
* sub-fields but the local engine cannot, so the variable stays `undefined` on a
|
|
370
|
-
* local run and nothing can branch on it. An explicit row alongside it maps one
|
|
371
|
-
* field the way every other output row works, which the runtime does resolve.
|
|
372
|
-
* The spec's own row is still emitted, so the artifact stays what the platform
|
|
373
|
-
* expects.
|
|
374
366
|
*/
|
|
375
367
|
outputs?: Record<string, string>;
|
|
376
368
|
/**
|
package/dist/bpmn-api.md
CHANGED
|
@@ -311,7 +311,7 @@ Extends `ActivityOpts` — its fields and methods apply here too.
|
|
|
311
311
|
- `OrchestratorOpts.releaseKey?: string` — Address the release by KEY instead of by name — the deployed resource's `Key` from `uip or processes list --folder-path…
|
|
312
312
|
- `OrchestratorOpts.folderKey?: string` — The folder's `FolderKey` GUID (the same `uip or processes list` row carries it), for a node addressed by…
|
|
313
313
|
- `OrchestratorOpts.outputs?: Record<string, string>` — EXTRA output rows: variable id → `=`-expression read against the node's own result, e.g. `{ message: '=result.message'…
|
|
314
|
-
- `OrchestratorOpts.outputVar?: string` — Variable
|
|
314
|
+
- `OrchestratorOpts.outputVar?: string` — Variable every output argument lands in (`=result`).
|
|
315
315
|
- `OrchestratorOpts.skipCondition?: string` — `=`-expression that skips the invocation when truthy.
|
|
316
316
|
|
|
317
317
|
### `OrchestratorAsyncOpts`
|
|
@@ -334,7 +334,7 @@ Extends `ActivityOpts` — its fields and methods apply here too.
|
|
|
334
334
|
- `QueueItemOpts.item?: Record<string, unknown>` — The item's content — serialized as the node's `ItemData` body.
|
|
335
335
|
- `QueueItemOpts.wait?: boolean` — `true` waits for the item to be processed and maps its outcome back (`Orchestrator.CreateAndWaitForQueueItem`); default…
|
|
336
336
|
- `QueueItemOpts.outputs?: Record<string, string>` — EXTRA output rows: variable id → `=`-expression read against the node's own result, e.g. `{ outputString:…
|
|
337
|
-
- `QueueItemOpts.outputVar?: string` — Variable the
|
|
337
|
+
- `QueueItemOpts.outputVar?: string` — Variable the whole result lands in (`=result`).
|
|
338
338
|
- `QueueItemOpts.skipCondition?: string` — `=`-expression that skips the enqueue when truthy.
|
|
339
339
|
|
|
340
340
|
### `HumanTaskOpts`
|
|
@@ -513,7 +513,7 @@ Extends `HumanTaskCommonOpts` — its fields and methods apply here too.
|
|
|
513
513
|
- `HumanTaskAppOpts.folder: string` — The Orchestrator folder path the app is deployed to, e.g. `'Shared'` or `'Finance/Invoices'` — the context's…
|
|
514
514
|
- `HumanTaskAppOpts.form?: never` — Not on this variant — see HumanTaskFormOpts.
|
|
515
515
|
- `HumanTaskAppOpts.input?: Record<string, unknown>` — Data the task shows the human — the node's `HitlTaskArguments`.
|
|
516
|
-
- `HumanTaskAppOpts.outputVar?: string` — Variable the whole
|
|
516
|
+
- `HumanTaskAppOpts.outputVar?: string` — Variable the task's whole result lands in (`=result`).
|
|
517
517
|
- `HumanTaskAppOpts.actions?: never` — Removed (#2144): a v1 `appId`-task field the V2 engine never reads.
|
|
518
518
|
- `HumanTaskAppOpts.appVersion?: never` — Removed (#2144): a v1 `appId`-task field the V2 engine never reads.
|
|
519
519
|
- `HumanTaskAppOpts.key?: never` — Removed (#2144): a v1 `appId`-task field the V2 engine never reads.
|
|
@@ -18,7 +18,7 @@ export interface BuildPorts {
|
|
|
18
18
|
/** Kill a `uip` call after this long. Unset means no limit, as the Python had none. */
|
|
19
19
|
timeoutMs?: number;
|
|
20
20
|
}
|
|
21
|
-
/** One describe that failed
|
|
21
|
+
/** One describe that failed: `(connector, object, operation, message)`. */
|
|
22
22
|
export type FailedFieldDescribe = readonly [
|
|
23
23
|
connectorKey: string,
|
|
24
24
|
objectName: string,
|
|
@@ -32,13 +32,15 @@ export type FailedFieldDescribe = readonly [
|
|
|
32
32
|
* `--connection-id`; `parentFields` are forwarded as `-f name=value` on
|
|
33
33
|
* describes and discriminate their cache key; `failedFieldDescribes` collects
|
|
34
34
|
* the CLI's own rejection message for each describe that failed under `-f`,
|
|
35
|
-
* because the pipeline otherwise swallows it (see `isDescribeOperation`)
|
|
35
|
+
* because the pipeline otherwise swallows it (see `isDescribeOperation`);
|
|
36
|
+
* `failedDescribes` collects every failed describe, with or without parent fields.
|
|
36
37
|
*/
|
|
37
38
|
export interface BuildContext extends BuildPorts {
|
|
38
39
|
connectionId?: string;
|
|
39
40
|
/** Insertion order is the `-f` order on the command line. */
|
|
40
41
|
parentFields: Map<string, string>;
|
|
41
42
|
failedFieldDescribes: FailedFieldDescribe[];
|
|
43
|
+
failedDescribes: FailedFieldDescribe[];
|
|
42
44
|
}
|
|
43
45
|
export interface BuildScope {
|
|
44
46
|
connectionId?: string;
|
|
@@ -100,10 +102,9 @@ export declare function registryGet(ctx: BuildContext, nodeType: string, quiet?:
|
|
|
100
102
|
* <object> --operation <op>` (plus `--connection-id` and `-f` when set).
|
|
101
103
|
*
|
|
102
104
|
* Returns the payload's `Data` on success, or `undefined` on any failure. A
|
|
103
|
-
* failure is cached too, with a sentinel that keeps the CLI's `Message
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* set — from a fresh call and from a cached failure alike.
|
|
105
|
+
* failure is cached too, with a sentinel that keeps the CLI's `Message`, and
|
|
106
|
+
* recorded on the context from a fresh call and a cached failure alike; a call
|
|
107
|
+
* with no parseable answer is recorded in `failedDescribes` only, and not cached.
|
|
107
108
|
*/
|
|
108
109
|
export declare function isDescribeOperation(ctx: BuildContext, connectorKey: string, objectName: string, operation: string): Promise<unknown>;
|
|
109
110
|
/**
|
|
@@ -29,6 +29,7 @@ export function createBuildContext(ports, scope = {}) {
|
|
|
29
29
|
...(scope.connectionId ? { connectionId: scope.connectionId } : {}),
|
|
30
30
|
parentFields,
|
|
31
31
|
failedFieldDescribes: [],
|
|
32
|
+
failedDescribes: [],
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
35
|
/** `_schema_cache_scope()`: static and per-connection responses never share a cache. */
|
|
@@ -149,20 +150,23 @@ export async function registryGet(ctx, nodeType, quiet = false) {
|
|
|
149
150
|
ctx.reporter.warn(` WARN: registry get failed for ${nodeType}: ${probe.miss.reason}`);
|
|
150
151
|
return undefined;
|
|
151
152
|
}
|
|
153
|
+
function describeFailure(connectorKey, objectName, operation, message) {
|
|
154
|
+
return [connectorKey, objectName, operation, typeof message === "string" && message ? message : ""];
|
|
155
|
+
}
|
|
152
156
|
function noteFailedFieldDescribe(ctx, connectorKey, objectName, operation, message) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
const failure = describeFailure(connectorKey, objectName, operation, message);
|
|
158
|
+
ctx.failedDescribes.push(failure);
|
|
159
|
+
if (ctx.parentFields.size > 0)
|
|
160
|
+
ctx.failedFieldDescribes.push(failure);
|
|
156
161
|
}
|
|
157
162
|
/**
|
|
158
163
|
* `is_describe_operation`: cached `uip is resources describe <connector>
|
|
159
164
|
* <object> --operation <op>` (plus `--connection-id` and `-f` when set).
|
|
160
165
|
*
|
|
161
166
|
* Returns the payload's `Data` on success, or `undefined` on any failure. A
|
|
162
|
-
* failure is cached too, with a sentinel that keeps the CLI's `Message
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
* set — from a fresh call and from a cached failure alike.
|
|
167
|
+
* failure is cached too, with a sentinel that keeps the CLI's `Message`, and
|
|
168
|
+
* recorded on the context from a fresh call and a cached failure alike; a call
|
|
169
|
+
* with no parseable answer is recorded in `failedDescribes` only, and not cached.
|
|
166
170
|
*/
|
|
167
171
|
export async function isDescribeOperation(ctx, connectorKey, objectName, operation) {
|
|
168
172
|
const parts = [schemaCacheScope(ctx), connectorKey, objectName, operation];
|
|
@@ -177,11 +181,11 @@ export async function isDescribeOperation(ctx, connectorKey, objectName, operati
|
|
|
177
181
|
return isPyDict(cached) && cached.Data !== undefined ? cached.Data : undefined;
|
|
178
182
|
}
|
|
179
183
|
const result = await runUip(ctx, isResourcesDescribeOperation(connectorKey, objectName, operation, ctx.connectionId, ctx.parentFields));
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
if (parsed === undefined)
|
|
184
|
+
const parsed = refused(result) ? undefined : parseStdout(result.stdout);
|
|
185
|
+
if (parsed === undefined) {
|
|
186
|
+
ctx.failedDescribes.push(describeFailure(connectorKey, objectName, operation, failureReason(result)));
|
|
184
187
|
return undefined;
|
|
188
|
+
}
|
|
185
189
|
const payload = envelope(parsed);
|
|
186
190
|
if (get(payload, "Result") !== "Success") {
|
|
187
191
|
noteFailedFieldDescribe(ctx, connectorKey, objectName, operation, get(payload, "Message"));
|
|
@@ -161,6 +161,7 @@ export async function enrichEntry(ctx, entry) {
|
|
|
161
161
|
if (!pyTruthy(opName))
|
|
162
162
|
return entry; // nothing to do
|
|
163
163
|
const failuresBefore = ctx.failedFieldDescribes.length;
|
|
164
|
+
const describeFailuresBefore = ctx.failedDescribes.length;
|
|
164
165
|
let data = await isDescribeOperation(ctx, connectorKey, objectName, opName);
|
|
165
166
|
if (!pyTruthy(data)) {
|
|
166
167
|
const alt = await discoverOperationName(ctx, entry);
|
|
@@ -175,6 +176,7 @@ export async function enrichEntry(ctx, entry) {
|
|
|
175
176
|
// query-entity-records and get-entity-record-by-id). Only the describe
|
|
176
177
|
// whose answer is used may speak for the parent set.
|
|
177
178
|
ctx.failedFieldDescribes.length = failuresBefore;
|
|
179
|
+
ctx.failedDescribes.length = describeFailuresBefore;
|
|
178
180
|
data = await isDescribeOperation(ctx, connectorKey, objectName, alt);
|
|
179
181
|
}
|
|
180
182
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type BuildContext, type FailedFieldDescribe } from "../library-build/context.js";
|
|
2
|
+
import type { LibraryEntry } from "../model/library.js";
|
|
3
|
+
export declare function recoverFailedDescribe(ctx: BuildContext, entry: LibraryEntry, failures: readonly FailedFieldDescribe[], warn: (line: string) => void): Promise<LibraryEntry>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { inputSchemaFromConnection } from "../../core/library.js";
|
|
2
|
+
import { enrichEntry } from "../library-build/enrich.js";
|
|
3
|
+
import { DescribeFallback, PrepareRefusal, describeFailedLine, describeFailedMessage } from "./messages.js";
|
|
4
|
+
const DESCRIBE_FAILED = "DESCRIBE_FAILED";
|
|
5
|
+
export async function recoverFailedDescribe(ctx, entry, failures, warn) {
|
|
6
|
+
const failure = failures.at(-1);
|
|
7
|
+
if (failure === undefined)
|
|
8
|
+
return entry;
|
|
9
|
+
if (ctx.parentFields.size > 0)
|
|
10
|
+
return entry;
|
|
11
|
+
if (inputSchemaFromConnection(entry)) {
|
|
12
|
+
warn(describeFailedLine(failure, DescribeFallback.RegistryEntry));
|
|
13
|
+
return entry;
|
|
14
|
+
}
|
|
15
|
+
// Shares `caches`; the describe without a connection caches under its own scope.
|
|
16
|
+
const withoutConnection = { ...ctx, connectionId: undefined, failedFieldDescribes: [], failedDescribes: [] };
|
|
17
|
+
const filled = await enrichEntry(withoutConnection, entry);
|
|
18
|
+
if (withoutConnection.failedDescribes.length === 0) {
|
|
19
|
+
warn(describeFailedLine(failure, DescribeFallback.WithoutConnection));
|
|
20
|
+
return filled;
|
|
21
|
+
}
|
|
22
|
+
if (entry.inputSchema.fields.length === 0)
|
|
23
|
+
throw new PrepareRefusal(describeFailedMessage(failure), DESCRIBE_FAILED);
|
|
24
|
+
warn(describeFailedLine(failure, DescribeFallback.RegistryEntry));
|
|
25
|
+
return entry;
|
|
26
|
+
}
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* `core/cli-spelling.ts`) without this module reading the environment.
|
|
22
22
|
*/
|
|
23
23
|
import { Refusal } from "../errors.js";
|
|
24
|
+
import type { FailedFieldDescribe } from "../library-build/context.js";
|
|
24
25
|
import { type RegistryCatalog, type RegistryRefresh } from "./actions.js";
|
|
25
26
|
import type { IntegrationServiceMiss } from "./integration-service.js";
|
|
26
27
|
export declare const PREFIX = "prepare-connector: ";
|
|
@@ -139,6 +140,16 @@ export declare function fieldFlagMessage(pair: string): string;
|
|
|
139
140
|
* non-empty message is the one quoted.
|
|
140
141
|
*/
|
|
141
142
|
export declare function rejectedParentFieldsMessage(pairs: readonly string[], failures?: ReadonlyArray<readonly unknown[]>): string;
|
|
143
|
+
/** What `prepare` did about a failed connection-scoped describe. */
|
|
144
|
+
export declare enum DescribeFallback {
|
|
145
|
+
/** The registry's entry was kept as it is. */
|
|
146
|
+
RegistryEntry = 0,
|
|
147
|
+
/** The input schema was read from the describe without the connection. */
|
|
148
|
+
WithoutConnection = 1
|
|
149
|
+
}
|
|
150
|
+
/** The warning when `is resources describe --connection-id` failed for the action. */
|
|
151
|
+
export declare function describeFailedLine(failure: FailedFieldDescribe, fallback: DescribeFallback): string;
|
|
152
|
+
export declare function describeFailedMessage(failure: FailedFieldDescribe): string;
|
|
142
153
|
/** ` object: <note>` — the ladder's normalization sentence. */
|
|
143
154
|
export declare function objectNoteLine(note: string): string;
|
|
144
155
|
/** ` object: <requested> -> <matched> recorded in <ledger>`. */
|
|
@@ -313,6 +313,35 @@ export function rejectedParentFieldsMessage(pairs, failures = []) {
|
|
|
313
313
|
"only inside its project), so they cannot be copied from another " +
|
|
314
314
|
"project, connection, or task.");
|
|
315
315
|
}
|
|
316
|
+
/** What `prepare` did about a failed connection-scoped describe. */
|
|
317
|
+
export var DescribeFallback;
|
|
318
|
+
(function (DescribeFallback) {
|
|
319
|
+
/** The registry's entry was kept as it is. */
|
|
320
|
+
DescribeFallback[DescribeFallback["RegistryEntry"] = 0] = "RegistryEntry";
|
|
321
|
+
/** The input schema was read from the describe without the connection. */
|
|
322
|
+
DescribeFallback[DescribeFallback["WithoutConnection"] = 1] = "WithoutConnection";
|
|
323
|
+
})(DescribeFallback || (DescribeFallback = {}));
|
|
324
|
+
function describeSubject(connectorKey, objectName, operation) {
|
|
325
|
+
return `${connectorKey} ${objectName} ${operation}`;
|
|
326
|
+
}
|
|
327
|
+
function serviceSaid(message) {
|
|
328
|
+
return (message || "no message").replace(/\.$/, "");
|
|
329
|
+
}
|
|
330
|
+
/** The warning when `is resources describe --connection-id` failed for the action. */
|
|
331
|
+
export function describeFailedLine(failure, fallback) {
|
|
332
|
+
const [connectorKey, objectName, operation, message] = failure;
|
|
333
|
+
const outcome = fallback === DescribeFallback.WithoutConnection
|
|
334
|
+
? "The input schema was read from the describe without the connection instead, so fields only this connection adds are missing."
|
|
335
|
+
: "The registry's entry was used as it is, so fields it does not list are missing.";
|
|
336
|
+
return (`${PREFIX}WARN: Integration Service could not describe ${describeSubject(connectorKey, objectName, operation)} ` +
|
|
337
|
+
`with this connection: ${serviceSaid(message)}. ${outcome}`);
|
|
338
|
+
}
|
|
339
|
+
export function describeFailedMessage(failure) {
|
|
340
|
+
const [connectorKey, objectName, operation, message] = failure;
|
|
341
|
+
return (`${PREFIX}Integration Service failed to describe ${describeSubject(connectorKey, objectName, operation)} ` +
|
|
342
|
+
`with this connection and without it, so no input field is known for it. Integration Service said: ${serviceSaid(message)}. ` +
|
|
343
|
+
"Editing the flow cannot fix this. Check the connection works and retry; if it still fails, report it with this output.");
|
|
344
|
+
}
|
|
316
345
|
// ---------------------------------------------------------------------------
|
|
317
346
|
// The object decision
|
|
318
347
|
/** ` object: <note>` — the ladder's normalization sentence. */
|
|
@@ -38,6 +38,7 @@ import { planLibrary } from "../library-build/plan.js";
|
|
|
38
38
|
import { MemoryResponseCache } from "../uip/response-cache.js";
|
|
39
39
|
import { catalogServesNothing, refreshRegistryCatalog, registryCatalog } from "./actions.js";
|
|
40
40
|
import { loginScope } from "./catalog-absence.js";
|
|
41
|
+
import { recoverFailedDescribe } from "./failed-describe.js";
|
|
41
42
|
import { loginStatusData } from "../uip/login-status.js";
|
|
42
43
|
import { chooseConnection, listConnections, lookupConnection, mergeBindings, restoreBindings, snapshotBindings, solutionConnectionIds, } from "./connections.js";
|
|
43
44
|
import { prepareEvent } from "./event.js";
|
|
@@ -536,7 +537,9 @@ async function prepareOnConnection(options, ports, connected, registryRefresh) {
|
|
|
536
537
|
throw new PrepareRefusal(objectFlagsOnlyForGenericMessage(), "OBJECT_NOT_GENERIC");
|
|
537
538
|
// An Integration Service entry IS the describe; there is nothing to enrich it with.
|
|
538
539
|
if (fromIntegrationService === undefined) {
|
|
540
|
+
const failuresBefore = ctx.failedDescribes.length;
|
|
539
541
|
entry = await enrichEntry(ctx, entry); // full schema via --connection-id
|
|
542
|
+
entry = await recoverFailedDescribe(ctx, entry, ctx.failedDescribes.slice(failuresBefore), warn);
|
|
540
543
|
if (isExternalOperation(entry.operation)) {
|
|
541
544
|
const { mode, event } = libraryExecution(entry.operation);
|
|
542
545
|
if (mode === undefined)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.124.
|
|
3
|
+
"version": "6.124.7",
|
|
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",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"@types/node": "^22.7.0",
|
|
128
128
|
"esbuild": "^0.28.1"
|
|
129
129
|
},
|
|
130
|
-
"gitref": "
|
|
130
|
+
"gitref": "f3fce2ed3e8035246ce94b916f07b6b979623d81"
|
|
131
131
|
}
|