@uipath/maestro-builder-sdk 6.120.17 → 6.120.19
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 +41 -41
- package/dist/api-members.md +183 -181
- package/dist/bpmn/bpmn-expr-check.d.ts +4 -0
- package/dist/bpmn/bpmn-expr-check.js +109 -19
- package/dist/bpmn/bpmn-sdk.d.ts +72 -29
- package/dist/bpmn/bpmn-sdk.js +89 -35
- package/dist/bpmn/check.js +32 -16
- package/dist/bpmn/declared-vars.d.ts +30 -1
- package/dist/bpmn/declared-vars.js +43 -0
- package/dist/bpmn/decompile.js +11 -1
- package/dist/bpmn/expression-value.d.ts +16 -0
- package/dist/bpmn/expression-value.js +18 -0
- package/dist/bpmn/registry-types.json +22 -31
- package/dist/bpmn/serialize.d.ts +0 -26
- package/dist/bpmn/serialize.js +3 -42
- package/dist/bpmn-api.md +8 -6
- package/dist/core/actions.d.ts +2 -2
- package/dist/core/list-envelope.d.ts +7 -0
- package/dist/core/refusals.d.ts +4 -0
- package/dist/core/refusals.js +4 -0
- package/dist/registry/curated-overlay.d.ts +18 -3
- package/dist/registry/curated-overlay.js +98 -5
- package/dist/registry/prepare/actions.d.ts +1 -1
- package/dist/registry/prepare/actions.js +1 -1
- package/dist/registry/prepare/messages.js +1 -1
- package/lib/library-json.samples/list-envelopes.json +29 -1
- package/package.json +2 -2
package/dist/bpmn/check.js
CHANGED
|
@@ -81,6 +81,17 @@ const SERVICE_TYPES_REQUIRING_RESOURCE = new Set([
|
|
|
81
81
|
* "these types need a resource".
|
|
82
82
|
*/
|
|
83
83
|
const HITL_QUICK_SCHEMA_CONTEXT = new Set(['_schemaFileId', 'hitlSchemaId', '__hitlFormSchema']);
|
|
84
|
+
/**
|
|
85
|
+
* Whether an `Actions.HITL` node's context makes it a quick form: `hitlType` `quick`, or no
|
|
86
|
+
* `hitlType` of `custom` and any quick-form schema row. Studio Web's `isHitlQuickMode`, and
|
|
87
|
+
* the CLI's `isQuickFormHitl`.
|
|
88
|
+
*/
|
|
89
|
+
function isQuickFormHitl(contextView) {
|
|
90
|
+
return (contextView['hitlType'] === 'quick' ||
|
|
91
|
+
(contextView['hitlType'] !== 'custom' && Object.keys(contextView).some((k) => HITL_QUICK_SCHEMA_CONTEXT.has(k))));
|
|
92
|
+
}
|
|
93
|
+
/** The app task's binding-backed context fields, which a quick form and a v1 task do not carry. */
|
|
94
|
+
const HITL_APP_FIELDS = new Set(['name', 'folderPath']);
|
|
84
95
|
/** The bounds the platform puts on a human task's `Timer`, in MINUTES. */
|
|
85
96
|
const MIN_TASK_TIMER_MINUTES = 15;
|
|
86
97
|
const MAX_TASK_TIMER_MINUTES = 90 * 24 * 60;
|
|
@@ -1760,6 +1771,21 @@ inEventSubProcess = false) {
|
|
|
1760
1771
|
const contextView = { ...n.context };
|
|
1761
1772
|
for (const row of n.contextRows ?? [])
|
|
1762
1773
|
contextView[row.name] = row.value ?? row.body ?? '';
|
|
1774
|
+
const quickHitl = n.type === 'Actions.HITL' && isQuickFormHitl(contextView);
|
|
1775
|
+
// The app binding rule holds an `Actions.HITL` node only at `version="v2"` and only
|
|
1776
|
+
// when it is an app task, as the CLI's does (`validateBoundResource`, UiPath/cli#5940):
|
|
1777
|
+
// a quick form binds no app, and a v1 task gets HITL_APP_V1 below instead.
|
|
1778
|
+
const hitlV1App = n.type === 'Actions.HITL' && !quickHitl && (n.typeVersion ?? 'v1') !== 'v2';
|
|
1779
|
+
const hitlAppUnbound = quickHitl || hitlV1App;
|
|
1780
|
+
if (hitlV1App)
|
|
1781
|
+
diags.push({
|
|
1782
|
+
level: 'warning',
|
|
1783
|
+
code: 'HITL_APP_V1',
|
|
1784
|
+
message: `"${n.id}" (Actions.HITL) is uipath:type version "${n.typeVersion ?? 'v1'}". The V2 engine reads an app task's app only ` +
|
|
1785
|
+
`from binding-backed name and folderPath at version "v2"; it reads no appId, and fails this task with 170000. ` +
|
|
1786
|
+
`Author it as .humanTask(id, { app: '<app name>', folder: '<folder path>' }), which writes the v2 task and its app bindings.`,
|
|
1787
|
+
where: n.id,
|
|
1788
|
+
});
|
|
1763
1789
|
// A job start addressed by key (`uipath:type version="v1"`) with no `folderKey`. The
|
|
1764
1790
|
// engine's v1 branch reads `releaseKey` and `folderKey`, not `folderPath`:
|
|
1765
1791
|
// `Orchestrator.ExecuteApiWorkflowAsync` so written faults with `Could not get value
|
|
@@ -1779,7 +1805,7 @@ inEventSubProcess = false) {
|
|
|
1779
1805
|
`process by name, which the SDK emits at version="v2".`,
|
|
1780
1806
|
where: n.id,
|
|
1781
1807
|
});
|
|
1782
|
-
for (const field of bindingRequiredFields(n.type, n.spec)) {
|
|
1808
|
+
for (const field of hitlAppUnbound ? [] : bindingRequiredFields(n.type, n.spec)) {
|
|
1783
1809
|
const value = contextView[field.name];
|
|
1784
1810
|
if (typeof value === 'string' && value.startsWith('=bindings.'))
|
|
1785
1811
|
continue;
|
|
@@ -1818,20 +1844,10 @@ inEventSubProcess = false) {
|
|
|
1818
1844
|
// is a warning here too: the platform accepts the process, so an error would be
|
|
1819
1845
|
// the SDK refusing what deploys.
|
|
1820
1846
|
if (SERVICE_TYPES_REQUIRING_RESOURCE.has(n.type)) {
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
// place this rule does not mirror it. The canvas rule reads only
|
|
1826
|
-
// `releaseKey`/`name`/`queueName`, so every `Actions.HITL` node — including
|
|
1827
|
-
// every one `.humanTask()` itself produces, which writes the app as `appId` —
|
|
1828
|
-
// trips it. Warning on a shape the SDK's own wrapper emits, about a field that
|
|
1829
|
-
// is not how an Action app is addressed, is noise the author cannot act on.
|
|
1830
|
-
// Safe in this direction: the platform reports MISSING_RESOURCE at WARNING, so
|
|
1831
|
-
// staying quiet cannot turn an accepted artifact into a rejected one. The
|
|
1832
|
-
// reverse — reporting more than the platform — is what this file forbids.
|
|
1833
|
-
const resourceFields = n.type === 'Actions.HITL' ? ['releaseKey', 'name', 'queueName', 'appId'] : ['releaseKey', 'name', 'queueName'];
|
|
1834
|
-
const bound = resourceFields.some((f) => {
|
|
1847
|
+
// The canvas rule reads `releaseKey`/`name`/`queueName`. An app task names its app
|
|
1848
|
+
// in `name` since #2144; a v1 `appId` task trips this as it does on the platform,
|
|
1849
|
+
// beside HITL_APP_V1.
|
|
1850
|
+
const bound = ['releaseKey', 'name', 'queueName'].some((f) => {
|
|
1835
1851
|
const v = contextView[f];
|
|
1836
1852
|
return v !== undefined && v !== null && String(v) !== '';
|
|
1837
1853
|
});
|
|
@@ -1864,7 +1880,7 @@ inEventSubProcess = false) {
|
|
|
1864
1880
|
? managedHttpMissing(contextNames, httpRequest)
|
|
1865
1881
|
: connectorV2
|
|
1866
1882
|
? connectorV2Missing(n.type, contextNames)
|
|
1867
|
-
: missingRequiredContext(n.type, contextNames, n.spec);
|
|
1883
|
+
: missingRequiredContext(n.type, contextNames, n.spec).filter((f) => !(hitlAppUnbound && HITL_APP_FIELDS.has(f)));
|
|
1868
1884
|
// ERROR only where `uip maestro bpmn validate` holds the node to the field; a WARNING
|
|
1869
1885
|
// where only the registry calls it required. For a type whose payload the canvas
|
|
1870
1886
|
// owns (dynamic, or a discovered `Intsvc.*` type) the CLI skips the required check,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* It lives outside `bpmn-sdk.ts` so the checker does not import the builder back
|
|
6
6
|
* (the runtime import cycle FB003 reported).
|
|
7
7
|
*/
|
|
8
|
-
import type { BpmnNode } from './bpmn-sdk.js';
|
|
8
|
+
import type { BpmnNode, BpmnVarDecl } from './bpmn-sdk.js';
|
|
9
9
|
/**
|
|
10
10
|
* The variables a connector task's output rows land in.
|
|
11
11
|
*
|
|
@@ -58,3 +58,32 @@ export declare function typedNodeDeclaredVars(n: Extract<BpmnNode, {
|
|
|
58
58
|
* @internal
|
|
59
59
|
*/
|
|
60
60
|
export declare function nodeDeclaredVars(n: BpmnNode): string[];
|
|
61
|
+
/**
|
|
62
|
+
* Where an unscoped PUBLIC declaration belongs at the top level of a process.
|
|
63
|
+
*
|
|
64
|
+
* Every real artifact agrees: across the 97 Studio Web exports and converter outputs
|
|
65
|
+
* measured (`research/bpmn-roundtrip/corpus/`, the run-6 `v1` arm), all 107 public
|
|
66
|
+
* `uipath:input` declarations are scoped to the process's manual START event and all
|
|
67
|
+
* 37 `uipath:output` declarations to the END event whose mapping writes them — none to
|
|
68
|
+
* the process. The engine does not need it (`BpmnDataManager.EvaluateProcessVariables`
|
|
69
|
+
* seeds every declaration into one variables scope by id, and an expression resolves
|
|
70
|
+
* `vars.<id>` there whatever the declaration's `elementId`), but the canvas, the
|
|
71
|
+
* entry-point derivation and the graders that read a process's contract do: a process
|
|
72
|
+
* input is "the start event's input". Until this, the SDK wrote the process id, which
|
|
73
|
+
* validated and ran and was the one placement nothing else on the platform produces —
|
|
74
|
+
* cluster D of docs/BPMN_AUTHORING_ERGONOMICS_DESIGN.md §1b.
|
|
75
|
+
*
|
|
76
|
+
* Shared by the serializer, which writes it, and the expression check, which needs to
|
|
77
|
+
* know where a public argument is readable from (#2138).
|
|
78
|
+
*
|
|
79
|
+
* The rule, mirrored by `bpmn-decompile` so an unscoped declaration round-trips without
|
|
80
|
+
* an explicit `elementId`:
|
|
81
|
+
* - `input` → the one root start event with no event definition and no trigger,
|
|
82
|
+
* when there is exactly one; else the process.
|
|
83
|
+
* - `output` → the one root end event whose payload writes `var="<id>"`; else the one
|
|
84
|
+
* root end event, when there is exactly one; else the process.
|
|
85
|
+
* - `inputOutput` → the process (an internal variable is process-level state; the
|
|
86
|
+
* engine's debug variables report lists exactly those).
|
|
87
|
+
* An explicit `elementId` always wins, and `null` still means "write none".
|
|
88
|
+
*/
|
|
89
|
+
export declare function publicDeclarationScope(nodes: BpmnNode[], processId: string): (v: BpmnVarDecl) => string;
|
|
@@ -80,3 +80,46 @@ export function nodeDeclaredVars(n) {
|
|
|
80
80
|
return Object.keys(n.set);
|
|
81
81
|
return [];
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Where an unscoped PUBLIC declaration belongs at the top level of a process.
|
|
85
|
+
*
|
|
86
|
+
* Every real artifact agrees: across the 97 Studio Web exports and converter outputs
|
|
87
|
+
* measured (`research/bpmn-roundtrip/corpus/`, the run-6 `v1` arm), all 107 public
|
|
88
|
+
* `uipath:input` declarations are scoped to the process's manual START event and all
|
|
89
|
+
* 37 `uipath:output` declarations to the END event whose mapping writes them — none to
|
|
90
|
+
* the process. The engine does not need it (`BpmnDataManager.EvaluateProcessVariables`
|
|
91
|
+
* seeds every declaration into one variables scope by id, and an expression resolves
|
|
92
|
+
* `vars.<id>` there whatever the declaration's `elementId`), but the canvas, the
|
|
93
|
+
* entry-point derivation and the graders that read a process's contract do: a process
|
|
94
|
+
* input is "the start event's input". Until this, the SDK wrote the process id, which
|
|
95
|
+
* validated and ran and was the one placement nothing else on the platform produces —
|
|
96
|
+
* cluster D of docs/BPMN_AUTHORING_ERGONOMICS_DESIGN.md §1b.
|
|
97
|
+
*
|
|
98
|
+
* Shared by the serializer, which writes it, and the expression check, which needs to
|
|
99
|
+
* know where a public argument is readable from (#2138).
|
|
100
|
+
*
|
|
101
|
+
* The rule, mirrored by `bpmn-decompile` so an unscoped declaration round-trips without
|
|
102
|
+
* an explicit `elementId`:
|
|
103
|
+
* - `input` → the one root start event with no event definition and no trigger,
|
|
104
|
+
* when there is exactly one; else the process.
|
|
105
|
+
* - `output` → the one root end event whose payload writes `var="<id>"`; else the one
|
|
106
|
+
* root end event, when there is exactly one; else the process.
|
|
107
|
+
* - `inputOutput` → the process (an internal variable is process-level state; the
|
|
108
|
+
* engine's debug variables report lists exactly those).
|
|
109
|
+
* An explicit `elementId` always wins, and `null` still means "write none".
|
|
110
|
+
*/
|
|
111
|
+
export function publicDeclarationScope(nodes, processId) {
|
|
112
|
+
const manualStarts = nodes.filter((n) => n.kind === 'startEvent' && n.event === undefined && n.trigger === undefined);
|
|
113
|
+
const ends = nodes.filter((n) => n.kind === 'endEvent');
|
|
114
|
+
return (v) => {
|
|
115
|
+
if (v.direction === 'input')
|
|
116
|
+
return manualStarts.length === 1 ? manualStarts[0].id : processId;
|
|
117
|
+
if (v.direction === 'output') {
|
|
118
|
+
const writers = ends.filter((e) => (e.payload?.outputRows ?? []).some((r) => r.var === v.id));
|
|
119
|
+
if (writers.length === 1)
|
|
120
|
+
return writers[0].id;
|
|
121
|
+
return ends.length === 1 ? ends[0].id : processId;
|
|
122
|
+
}
|
|
123
|
+
return processId;
|
|
124
|
+
};
|
|
125
|
+
}
|
package/dist/bpmn/decompile.js
CHANGED
|
@@ -1176,7 +1176,17 @@ function publicDeclarationScopeOf(process, processId) {
|
|
|
1176
1176
|
// payload — manual to this side, not manual to the emitter. The round trip then moved
|
|
1177
1177
|
// a public input's `elementId` from the trigger start to the process. Excluding ANY
|
|
1178
1178
|
// typed payload makes the two agree for every shape the SDK can emit.
|
|
1179
|
-
|
|
1179
|
+
//
|
|
1180
|
+
// A `uipath:mapping` is not a typed payload: it is the `BPMN.Variables` mapping a
|
|
1181
|
+
// manual start carries to copy its inputs into process variables (the canvas's own
|
|
1182
|
+
// shape, and the only element allowed to read an input — #2138). It decompiles to
|
|
1183
|
+
// `.startEvent(id, { payload })`, which the emitter counts as manual, so it is one here.
|
|
1184
|
+
const manualStarts = elements.filter((el) => {
|
|
1185
|
+
if (el.$type !== 'bpmn:StartEvent' || (el.eventDefinitions ?? []).length)
|
|
1186
|
+
return false;
|
|
1187
|
+
const payload = payloadOf(el);
|
|
1188
|
+
return payload === undefined || payload.$type === 'uipath:Mapping';
|
|
1189
|
+
});
|
|
1180
1190
|
const ends = elements.filter((el) => el.$type === 'bpmn:EndEvent');
|
|
1181
1191
|
return (kind, v) => {
|
|
1182
1192
|
if (kind === 'input')
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* expression-value — whether a value-or-expression field holds an expression.
|
|
3
|
+
*
|
|
4
|
+
* Some BPMN fields take either an `=`-expression or a literal: a `.task({ set })`
|
|
5
|
+
* value and a script task's `inputs` value. The rule for both is the one the
|
|
6
|
+
* serializer applies: a string starting with `=` is an expression, anything else is
|
|
7
|
+
* literal text. `serialize` writes a literal `set` value as `=js:"<text>"`
|
|
8
|
+
* (`assignmentSource`), and a literal script input as a JSON string in the `args`
|
|
9
|
+
* body. Neither reads a variable.
|
|
10
|
+
*
|
|
11
|
+
* `serialize` and `bpmn-expr-check` both call this, so the check reports a variable
|
|
12
|
+
* read only where the emitted artifact reads one. For example, `set: { label:
|
|
13
|
+
* 'vars.amount' }` assigns the text "vars.amount" and is not checked as a read.
|
|
14
|
+
*/
|
|
15
|
+
/** True when `value` is an `=`-expression, false when it is literal text. */
|
|
16
|
+
export declare function isExpressionValue(value: string): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* expression-value — whether a value-or-expression field holds an expression.
|
|
3
|
+
*
|
|
4
|
+
* Some BPMN fields take either an `=`-expression or a literal: a `.task({ set })`
|
|
5
|
+
* value and a script task's `inputs` value. The rule for both is the one the
|
|
6
|
+
* serializer applies: a string starting with `=` is an expression, anything else is
|
|
7
|
+
* literal text. `serialize` writes a literal `set` value as `=js:"<text>"`
|
|
8
|
+
* (`assignmentSource`), and a literal script input as a JSON string in the `args`
|
|
9
|
+
* body. Neither reads a variable.
|
|
10
|
+
*
|
|
11
|
+
* `serialize` and `bpmn-expr-check` both call this, so the check reports a variable
|
|
12
|
+
* read only where the emitted artifact reads one. For example, `set: { label:
|
|
13
|
+
* 'vars.amount' }` assigns the text "vars.amount" and is not checked as a read.
|
|
14
|
+
*/
|
|
15
|
+
/** True when `value` is an `=`-expression, false when it is literal text. */
|
|
16
|
+
export function isExpressionValue(value) {
|
|
17
|
+
return value.startsWith('=');
|
|
18
|
+
}
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
],
|
|
8
8
|
"provenance": {
|
|
9
9
|
"typeCount": 51,
|
|
10
|
-
"uipVersion": "1.205.0-preview.256"
|
|
10
|
+
"uipVersion": "1.205.0-preview.256",
|
|
11
|
+
"refreshed": {
|
|
12
|
+
"Actions.HITL": "uipath-cli@12ed25c97 bpmn-spec.json 1.1.0"
|
|
13
|
+
}
|
|
11
14
|
},
|
|
12
15
|
"types": {
|
|
13
16
|
"A2A.AgentExecution": {
|
|
@@ -89,44 +92,32 @@
|
|
|
89
92
|
"inputTarget": "bodyField",
|
|
90
93
|
"context": [
|
|
91
94
|
{
|
|
92
|
-
"name": "
|
|
93
|
-
"displayName":
|
|
94
|
-
"type": "string",
|
|
95
|
-
"required": false,
|
|
96
|
-
"hidden": true,
|
|
97
|
-
"binding": false,
|
|
98
|
-
"default": null,
|
|
99
|
-
"bindingInfo": null
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"name": "appVersion",
|
|
103
|
-
"displayName": null,
|
|
104
|
-
"type": "number",
|
|
105
|
-
"required": false,
|
|
106
|
-
"hidden": true,
|
|
107
|
-
"binding": false,
|
|
108
|
-
"default": null,
|
|
109
|
-
"bindingInfo": null
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"name": "actions",
|
|
113
|
-
"displayName": null,
|
|
95
|
+
"name": "name",
|
|
96
|
+
"displayName": "App",
|
|
114
97
|
"type": "string",
|
|
115
|
-
"required":
|
|
98
|
+
"required": true,
|
|
116
99
|
"hidden": true,
|
|
117
|
-
"binding":
|
|
100
|
+
"binding": true,
|
|
118
101
|
"default": null,
|
|
119
|
-
"bindingInfo":
|
|
102
|
+
"bindingInfo": {
|
|
103
|
+
"resource": "app",
|
|
104
|
+
"propertyAttribute": "name",
|
|
105
|
+
"resourceKeyPattern": "${metadata.key}"
|
|
106
|
+
}
|
|
120
107
|
},
|
|
121
108
|
{
|
|
122
|
-
"name": "
|
|
109
|
+
"name": "folderPath",
|
|
123
110
|
"displayName": null,
|
|
124
111
|
"type": "string",
|
|
125
|
-
"required":
|
|
112
|
+
"required": true,
|
|
126
113
|
"hidden": true,
|
|
127
|
-
"binding":
|
|
114
|
+
"binding": true,
|
|
128
115
|
"default": null,
|
|
129
|
-
"bindingInfo":
|
|
116
|
+
"bindingInfo": {
|
|
117
|
+
"resource": "app",
|
|
118
|
+
"propertyAttribute": "folderPath",
|
|
119
|
+
"resourceKeyPattern": "${metadata.key}"
|
|
120
|
+
}
|
|
130
121
|
},
|
|
131
122
|
{
|
|
132
123
|
"name": "taskTitle",
|
|
@@ -149,7 +140,7 @@
|
|
|
149
140
|
"eventDefinition": null,
|
|
150
141
|
"requiresDiscovery": true,
|
|
151
142
|
"isDynamic": true,
|
|
152
|
-
"bindingPattern": "
|
|
143
|
+
"bindingPattern": "app",
|
|
153
144
|
"placements": {
|
|
154
145
|
"Activity": {
|
|
155
146
|
"element": "bpmn:UserTask",
|
package/dist/bpmn/serialize.d.ts
CHANGED
|
@@ -181,32 +181,6 @@ export declare function implicitNodeVars(nodes: BpmnNode[], declared: BpmnVarDec
|
|
|
181
181
|
* An explicit `resourceKey` on the declaration is never overridden.
|
|
182
182
|
*/
|
|
183
183
|
export declare function folderCompanionKeys(built: BuiltBpmn, sink: Map<string, Record<string, unknown>>): Map<string, string>;
|
|
184
|
-
/**
|
|
185
|
-
* Where an unscoped PUBLIC declaration belongs at the top level of a process.
|
|
186
|
-
*
|
|
187
|
-
* Every real artifact agrees: across the 97 Studio Web exports and converter outputs
|
|
188
|
-
* measured (`research/bpmn-roundtrip/corpus/`, the run-6 `v1` arm), all 107 public
|
|
189
|
-
* `uipath:input` declarations are scoped to the process's manual START event and all
|
|
190
|
-
* 37 `uipath:output` declarations to the END event whose mapping writes them — none to
|
|
191
|
-
* the process. The engine does not need it (`BpmnDataManager.EvaluateProcessVariables`
|
|
192
|
-
* seeds every declaration into one variables scope by id, and an expression resolves
|
|
193
|
-
* `vars.<id>` there whatever the declaration's `elementId`), but the canvas, the
|
|
194
|
-
* entry-point derivation and the graders that read a process's contract do: a process
|
|
195
|
-
* input is "the start event's input". Until this, the SDK wrote the process id, which
|
|
196
|
-
* validated and ran and was the one placement nothing else on the platform produces —
|
|
197
|
-
* cluster D of docs/BPMN_AUTHORING_ERGONOMICS_DESIGN.md §1b.
|
|
198
|
-
*
|
|
199
|
-
* The rule, mirrored by `bpmn-decompile` so an unscoped declaration round-trips without
|
|
200
|
-
* an explicit `elementId`:
|
|
201
|
-
* - `input` → the one root start event with no event definition and no trigger,
|
|
202
|
-
* when there is exactly one; else the process.
|
|
203
|
-
* - `output` → the one root end event whose payload writes `var="<id>"`; else the one
|
|
204
|
-
* root end event, when there is exactly one; else the process.
|
|
205
|
-
* - `inputOutput` → the process (an internal variable is process-level state; the
|
|
206
|
-
* engine's debug variables report lists exactly those).
|
|
207
|
-
* An explicit `elementId` always wins, and `null` still means "write none".
|
|
208
|
-
*/
|
|
209
|
-
export declare function publicDeclarationScope(nodes: BpmnNode[], processId: string): (v: BpmnVarDecl) => string;
|
|
210
184
|
/** Flatten a scope's nodes (recursing sub-processes) for global scans. */
|
|
211
185
|
export declare function allNodes(nodes: BpmnNode[]): BpmnNode[];
|
|
212
186
|
export {};
|
package/dist/bpmn/serialize.js
CHANGED
|
@@ -21,8 +21,9 @@ import { createConnectorEvent, createExternalTask } from './intsvc.js';
|
|
|
21
21
|
import { connectorEventErrorVar, intsvcOutputVar } from './intsvc-vars.js';
|
|
22
22
|
import { IMPLICIT_CONNECTION } from './managed-http.js';
|
|
23
23
|
import { createExtensionPayload, createTypedNode, rowDeclaration, typedNodeOutputVar, verbatimOutputRows } from './typed-node.js';
|
|
24
|
-
import { connectorOutputVars, nodeDeclaredVars, typedNodeDeclaredVars } from './declared-vars.js';
|
|
24
|
+
import { connectorOutputVars, nodeDeclaredVars, publicDeclarationScope, typedNodeDeclaredVars } from './declared-vars.js';
|
|
25
25
|
import { defaultEntryPointId } from './entry-point-id.js';
|
|
26
|
+
import { isExpressionValue } from './expression-value.js';
|
|
26
27
|
import { parseXmlRanges } from './xml-ranges.js';
|
|
27
28
|
import { ownEntry } from '../core/own-entry.js';
|
|
28
29
|
import { CompileRefusal } from '../core/compile-refusal.js';
|
|
@@ -1130,7 +1131,7 @@ function outputRows(ctx, map, custom = false) {
|
|
|
1130
1131
|
* too, since JSON permits them raw and only ES2019+ accepts them in a literal.
|
|
1131
1132
|
*/
|
|
1132
1133
|
function assignmentSource(value) {
|
|
1133
|
-
if (value
|
|
1134
|
+
if (isExpressionValue(value))
|
|
1134
1135
|
return value;
|
|
1135
1136
|
// Escape sequences, not the raw characters, so the regexes survive an editor.
|
|
1136
1137
|
const literal = JSON.stringify(value).replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
|
|
@@ -1437,46 +1438,6 @@ function orderVars(vars, order) {
|
|
|
1437
1438
|
.sort((a, b) => a.r - b.r || a.i - b.i)
|
|
1438
1439
|
.map((e) => e.v);
|
|
1439
1440
|
}
|
|
1440
|
-
/**
|
|
1441
|
-
* Where an unscoped PUBLIC declaration belongs at the top level of a process.
|
|
1442
|
-
*
|
|
1443
|
-
* Every real artifact agrees: across the 97 Studio Web exports and converter outputs
|
|
1444
|
-
* measured (`research/bpmn-roundtrip/corpus/`, the run-6 `v1` arm), all 107 public
|
|
1445
|
-
* `uipath:input` declarations are scoped to the process's manual START event and all
|
|
1446
|
-
* 37 `uipath:output` declarations to the END event whose mapping writes them — none to
|
|
1447
|
-
* the process. The engine does not need it (`BpmnDataManager.EvaluateProcessVariables`
|
|
1448
|
-
* seeds every declaration into one variables scope by id, and an expression resolves
|
|
1449
|
-
* `vars.<id>` there whatever the declaration's `elementId`), but the canvas, the
|
|
1450
|
-
* entry-point derivation and the graders that read a process's contract do: a process
|
|
1451
|
-
* input is "the start event's input". Until this, the SDK wrote the process id, which
|
|
1452
|
-
* validated and ran and was the one placement nothing else on the platform produces —
|
|
1453
|
-
* cluster D of docs/BPMN_AUTHORING_ERGONOMICS_DESIGN.md §1b.
|
|
1454
|
-
*
|
|
1455
|
-
* The rule, mirrored by `bpmn-decompile` so an unscoped declaration round-trips without
|
|
1456
|
-
* an explicit `elementId`:
|
|
1457
|
-
* - `input` → the one root start event with no event definition and no trigger,
|
|
1458
|
-
* when there is exactly one; else the process.
|
|
1459
|
-
* - `output` → the one root end event whose payload writes `var="<id>"`; else the one
|
|
1460
|
-
* root end event, when there is exactly one; else the process.
|
|
1461
|
-
* - `inputOutput` → the process (an internal variable is process-level state; the
|
|
1462
|
-
* engine's debug variables report lists exactly those).
|
|
1463
|
-
* An explicit `elementId` always wins, and `null` still means "write none".
|
|
1464
|
-
*/
|
|
1465
|
-
export function publicDeclarationScope(nodes, processId) {
|
|
1466
|
-
const manualStarts = nodes.filter((n) => n.kind === 'startEvent' && n.event === undefined && n.trigger === undefined);
|
|
1467
|
-
const ends = nodes.filter((n) => n.kind === 'endEvent');
|
|
1468
|
-
return (v) => {
|
|
1469
|
-
if (v.direction === 'input')
|
|
1470
|
-
return manualStarts.length === 1 ? manualStarts[0].id : processId;
|
|
1471
|
-
if (v.direction === 'output') {
|
|
1472
|
-
const writers = ends.filter((e) => (e.payload?.outputRows ?? []).some((r) => r.var === v.id));
|
|
1473
|
-
if (writers.length === 1)
|
|
1474
|
-
return writers[0].id;
|
|
1475
|
-
return ends.length === 1 ? ends[0].id : processId;
|
|
1476
|
-
}
|
|
1477
|
-
return processId;
|
|
1478
|
-
};
|
|
1479
|
-
}
|
|
1480
1441
|
// ─── Small helpers ────────────────────────────────────────────────────────────
|
|
1481
1442
|
function cap(s) {
|
|
1482
1443
|
return s.charAt(0).toUpperCase() + s.slice(1);
|
package/dist/bpmn-api.md
CHANGED
|
@@ -95,7 +95,7 @@ The set of node/flow/variable methods common to the process root and every sub-p
|
|
|
95
95
|
- `ScopeBuilder.flowIds(entries: PinnedFlowId[]): this` — Give the edges the nesting constructs IMPLY the ids you choose.
|
|
96
96
|
- `ScopeBuilder.sequenceFlow(source: string, target: string, opts?: FlowOpts): this` — A sequence flow from `source` to `target` (1-1 with `bpmn:sequenceFlow`).
|
|
97
97
|
- `ScopeBuilder.var(id: string, type: BpmnVarType, opts?: VarOpts): this` — A mutable flow variable (`uipath:inputOutput`).
|
|
98
|
-
- `ScopeBuilder.input(id: string, type: BpmnVarType, opts?: VarOpts): this` — A read-only entry input (`uipath:input`).
|
|
98
|
+
- `ScopeBuilder.input(id: string, type: BpmnVarType, opts?: VarOpts): this` — A read-only entry input (`uipath:input`), scoped to the manual start event.
|
|
99
99
|
- `ScopeBuilder.output(id: string, type: BpmnVarType, opts?: VarOpts): this` — A return value (`uipath:output`).
|
|
100
100
|
- `ScopeBuilder.vars(entries: VarEntry[]): this` — Several declarations as one call — the array form of `.var()` / `.input()` / `.output()`.
|
|
101
101
|
|
|
@@ -479,7 +479,7 @@ What every ACTIVITY accepts, on top of its own options — a script task, a vari
|
|
|
479
479
|
- `ConnectorOpts.version?: string` — Connector action version (defaults to the library's newest match).
|
|
480
480
|
- `ConnectorOpts.connection?: string` — Symbolic connection name declared in bindings.json (→ ConnectionId).
|
|
481
481
|
- `ConnectorOpts.folder?: string` — Symbolic folder name declared in bindings.json (→ connectionFolderKey).
|
|
482
|
-
- `ConnectorOpts.object?: string` — Which OBJECT a **generic** operation addresses — e.g. ServiceNow's "List
|
|
482
|
+
- `ConnectorOpts.object?: string` — Which OBJECT a **generic** operation addresses — e.g. ServiceNow's "List Records" on `'acr_user'`, NetSuite's "Get…
|
|
483
483
|
- `ConnectorOpts.carried?: CarriedConnectorOperation` — Flow only, and written by decompile, not by an author: the `.flow` file's own description of an operation the connector…
|
|
484
484
|
|
|
485
485
|
### `HumanTaskAppOpts`
|
|
@@ -488,13 +488,14 @@ Options for `.humanTask()` backed by an Action App — an `Actions.HITL` action-
|
|
|
488
488
|
|
|
489
489
|
Extends `HumanTaskCommonOpts` — its fields and methods apply here too.
|
|
490
490
|
|
|
491
|
-
- `HumanTaskAppOpts.app: string` — The Action App's
|
|
491
|
+
- `HumanTaskAppOpts.app: string` — The Action App's name, e.g. `'InvoiceApproval'` — the context's `name`.
|
|
492
|
+
- `HumanTaskAppOpts.folder: string` — The Orchestrator folder path the app is deployed to, e.g. `'Shared'` or `'Finance/Invoices'` — the context's…
|
|
492
493
|
- `HumanTaskAppOpts.form?: never` — Not on this variant — see HumanTaskFormOpts.
|
|
493
|
-
- `HumanTaskAppOpts.appVersion?: number` — The app version (`appVersion`).
|
|
494
|
-
- `HumanTaskAppOpts.actions?: string[]` — The outcomes a human can pick, e.g. `['approve', 'reject']`.
|
|
495
|
-
- `HumanTaskAppOpts.key?: string` — An existing task key, when resuming rather than creating (`key`).
|
|
496
494
|
- `HumanTaskAppOpts.input?: Record<string, unknown>` — Data the task shows the human — the node's `HitlTaskArguments`.
|
|
497
495
|
- `HumanTaskAppOpts.outputVar?: string` — Variable the whole typed response lands in.
|
|
496
|
+
- `HumanTaskAppOpts.actions?: never` — Removed (#2144): a v1 `appId`-task field the V2 engine never reads.
|
|
497
|
+
- `HumanTaskAppOpts.appVersion?: never` — Removed (#2144): a v1 `appId`-task field the V2 engine never reads.
|
|
498
|
+
- `HumanTaskAppOpts.key?: never` — Removed (#2144): a v1 `appId`-task field the V2 engine never reads.
|
|
498
499
|
|
|
499
500
|
### `HumanTaskFormOpts`
|
|
500
501
|
|
|
@@ -504,6 +505,7 @@ Extends `HumanTaskCommonOpts` — its fields and methods apply here too.
|
|
|
504
505
|
|
|
505
506
|
- `HumanTaskFormOpts.form: HumanTaskForm` — The inline form: its fields and its outcomes.
|
|
506
507
|
- `HumanTaskFormOpts.app?: never` — Not on this variant — the form replaces the app.
|
|
508
|
+
- `HumanTaskFormOpts.folder?: never` — Not on this variant — there is no app to look up in a folder.
|
|
507
509
|
- `HumanTaskFormOpts.priority?: string` — Action Center priority, e.g. `'Medium'` (`priority`).
|
|
508
510
|
- `HumanTaskFormOpts.labels?: string` — Action Center labels, comma-separated (`labels`).
|
|
509
511
|
- `HumanTaskFormOpts.outputVar?: never` — Not on this variant.
|
package/dist/core/actions.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface ConnectorOpts {
|
|
|
24
24
|
/** Symbolic folder name declared in bindings.json (→ connectionFolderKey). Required with `connection`. */
|
|
25
25
|
folder?: string;
|
|
26
26
|
/**
|
|
27
|
-
* Which OBJECT a **generic** operation addresses — e.g. ServiceNow's "List
|
|
27
|
+
* Which OBJECT a **generic** operation addresses — e.g. ServiceNow's "List
|
|
28
28
|
* Records" on `'acr_user'`, NetSuite's "Get Record" on `'AccountingPeriod'`.
|
|
29
29
|
*
|
|
30
30
|
* A generic (`GenericExpanded`) operation encodes only the VERB in its node
|
|
@@ -37,7 +37,7 @@ export interface ConnectorOpts {
|
|
|
37
37
|
* sorted first, silently.
|
|
38
38
|
*
|
|
39
39
|
* ```ts
|
|
40
|
-
* connector('uipath-servicenow-servicenow', 'list-
|
|
40
|
+
* connector('uipath-servicenow-servicenow', 'list-records', {},
|
|
41
41
|
* { connection: 'servicenow', folder: 'shared', object: 'acr_user' })
|
|
42
42
|
* ```
|
|
43
43
|
*
|
|
@@ -50,6 +50,13 @@ export interface ListEnvelopeRow {
|
|
|
50
50
|
* a dispatcher that needs to normalise between the CLI and the platform.
|
|
51
51
|
*/
|
|
52
52
|
cliShape?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Set on a row whose `nodeType` the current library no longer serves (the
|
|
55
|
+
* operation was renamed and the measurement re-keyed). Readers still match
|
|
56
|
+
* it, for libraries built before the rename; `checkCuratedOverlay` does not
|
|
57
|
+
* require the library to carry it.
|
|
58
|
+
*/
|
|
59
|
+
keyRetired?: string;
|
|
53
60
|
}
|
|
54
61
|
/**
|
|
55
62
|
* Every declared row, from `<libraryDir>/list-envelopes.json`. An absent file is
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -116,6 +116,8 @@ export declare const REFUSALS: {
|
|
|
116
116
|
readonly BPMN_HTTP_CONNECTOR_FIELDS_NO_CONNECTION: "lowering";
|
|
117
117
|
readonly BPMN_HTTP_OUTPUT_VAR_RESERVED: "lowering";
|
|
118
118
|
readonly BPMN_HUMAN_TASK_APP_FIELDS_ON_FORM: "lowering";
|
|
119
|
+
readonly BPMN_HUMAN_TASK_APP_NO_FOLDER: "lowering";
|
|
120
|
+
readonly BPMN_HUMAN_TASK_APP_V1_FIELDS: "lowering";
|
|
119
121
|
readonly BPMN_HUMAN_TASK_APP_XOR_FORM: "lowering";
|
|
120
122
|
readonly BPMN_JSON_INPUT_CDATA_END: "lowering";
|
|
121
123
|
readonly BPMN_NO_DEFAULT_EXPORT: "lowering";
|
|
@@ -352,6 +354,7 @@ export declare const REFUSALS: {
|
|
|
352
354
|
readonly EVENT_UNPREPARED: "lint";
|
|
353
355
|
readonly EVENT_WHERE_NOT_SCALAR: "lowering";
|
|
354
356
|
readonly EXCEPTION_STAGE_REQUIRED: "lint";
|
|
357
|
+
readonly EXPR_ARGUMENT_REF: "lint";
|
|
355
358
|
readonly EXPR_BARE_VAR_REF: "lint";
|
|
356
359
|
readonly EXPR_SYNTAX: "lowering";
|
|
357
360
|
readonly EXPR_UNDECLARED_REF: "lint";
|
|
@@ -416,6 +419,7 @@ export declare const REFUSALS: {
|
|
|
416
419
|
readonly HITL_APP_NO_SCHEMA: "lint";
|
|
417
420
|
readonly HITL_APP_OUTCOME_UNKNOWN: "lowering";
|
|
418
421
|
readonly HITL_APP_SCHEMA_INVALID: "lowering";
|
|
422
|
+
readonly HITL_APP_V1: "lint";
|
|
419
423
|
readonly HITL_APP_WITHOUT_VARIANT: "lowering";
|
|
420
424
|
readonly HITL_APP_WITH_FIELDS: "lint";
|
|
421
425
|
readonly HITL_CHANNEL_UNKNOWN: "lint";
|
package/dist/core/refusals.js
CHANGED
|
@@ -165,6 +165,8 @@ export const REFUSALS = {
|
|
|
165
165
|
BPMN_HTTP_CONNECTOR_FIELDS_NO_CONNECTION: 'lowering',
|
|
166
166
|
BPMN_HTTP_OUTPUT_VAR_RESERVED: 'lowering',
|
|
167
167
|
BPMN_HUMAN_TASK_APP_FIELDS_ON_FORM: 'lowering',
|
|
168
|
+
BPMN_HUMAN_TASK_APP_NO_FOLDER: 'lowering',
|
|
169
|
+
BPMN_HUMAN_TASK_APP_V1_FIELDS: 'lowering',
|
|
168
170
|
BPMN_HUMAN_TASK_APP_XOR_FORM: 'lowering',
|
|
169
171
|
BPMN_JSON_INPUT_CDATA_END: 'lowering',
|
|
170
172
|
BPMN_NO_DEFAULT_EXPORT: 'lowering',
|
|
@@ -426,6 +428,7 @@ export const REFUSALS = {
|
|
|
426
428
|
EVENT_UNPREPARED: 'lint',
|
|
427
429
|
EVENT_WHERE_NOT_SCALAR: 'lowering',
|
|
428
430
|
EXCEPTION_STAGE_REQUIRED: 'lint',
|
|
431
|
+
EXPR_ARGUMENT_REF: 'lint',
|
|
429
432
|
EXPR_BARE_VAR_REF: 'lint',
|
|
430
433
|
EXPR_SYNTAX: 'lowering',
|
|
431
434
|
EXPR_UNDECLARED_REF: 'lint',
|
|
@@ -492,6 +495,7 @@ export const REFUSALS = {
|
|
|
492
495
|
HITL_APP_NO_SCHEMA: 'lint',
|
|
493
496
|
HITL_APP_OUTCOME_UNKNOWN: 'lowering',
|
|
494
497
|
HITL_APP_SCHEMA_INVALID: 'lowering',
|
|
498
|
+
HITL_APP_V1: 'lint',
|
|
495
499
|
HITL_APP_WITHOUT_VARIANT: 'lowering',
|
|
496
500
|
HITL_APP_WITH_FIELDS: 'lint',
|
|
497
501
|
HITL_CHANNEL_UNKNOWN: 'lint',
|
|
@@ -5,6 +5,8 @@ export declare function bundledOverlayPath(): string;
|
|
|
5
5
|
export declare function curatedOverlayIdentity(overlayPath?: string): Promise<string>;
|
|
6
6
|
/** The ledger of deliberate patches; read here, never copied into a library. */
|
|
7
7
|
export declare const CORRECTIONS_FILE = "overlay-corrections.json";
|
|
8
|
+
/** SDK-owned side-tables the published library does not carry; always copied. */
|
|
9
|
+
export declare const SIDE_TABLES: ReadonlySet<string>;
|
|
8
10
|
/** One row of {@link CORRECTIONS_FILE}. */
|
|
9
11
|
export interface OverlayCorrection {
|
|
10
12
|
path: string;
|
|
@@ -94,12 +96,25 @@ export interface CuratedOverlayCheck {
|
|
|
94
96
|
* was renamed or re-versioned. `registry pull` only warns about these too.
|
|
95
97
|
*/
|
|
96
98
|
staleCorrections: string[];
|
|
99
|
+
/**
|
|
100
|
+
* Side-table rows keyed on something the library no longer carries, so the
|
|
101
|
+
* row has stopped applying: a `list-envelopes.json` row whose `nodeType` the
|
|
102
|
+
* library does not index (or whose `objectName` is not among the per-object
|
|
103
|
+
* rows of that node type), or an `invariant-collections.json` row whose
|
|
104
|
+
* collection no input field references. A refresh that renames an operation
|
|
105
|
+
* silently drops a measured row otherwise (#853: `list-all-records` became
|
|
106
|
+
* `list-records`). A row marked `keyRetired` is kept for older libraries
|
|
107
|
+
* and not checked.
|
|
108
|
+
*/
|
|
109
|
+
staleSideTableRows: string[];
|
|
97
110
|
}
|
|
98
111
|
/**
|
|
99
|
-
* Check `libraryPath` against the curated overlay.
|
|
100
|
-
* {@link applyCuratedOverlay} has run on it, unless a correction
|
|
112
|
+
* Check `libraryPath` against the curated overlay. All three lists are empty
|
|
113
|
+
* once {@link applyCuratedOverlay} has run on it, unless a correction or a
|
|
114
|
+
* side-table row went stale.
|
|
101
115
|
* Every overlay identity that is not a correction must be indexed at a file
|
|
102
|
-
* that exists,
|
|
116
|
+
* that exists, each side-table must equal the bundled copy, and each
|
|
117
|
+
* side-table row must still key on something the library carries.
|
|
103
118
|
*
|
|
104
119
|
* The connector library pipeline runs this on the archive it publishes,
|
|
105
120
|
* because readers that load that archive directly apply no overlay.
|