@uipath/maestro-builder-sdk 6.120.15 → 6.120.16
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 +42 -42
- package/dist/api-members.md +177 -176
- package/dist/bpmn/bpmn-sdk.d.ts +10 -2
- package/dist/bpmn/bpmn-sdk.js +7 -2
- package/dist/bpmn/decompile.js +0 -1
- package/dist/bpmn/human-task-form.d.ts +1 -3
- package/dist/bpmn/human-task-form.js +23 -14
- package/dist/bpmn-api.md +2 -1
- package/package.json +2 -2
package/dist/bpmn/bpmn-sdk.d.ts
CHANGED
|
@@ -1535,8 +1535,6 @@ export interface HumanTaskCommonOpts extends ActivityOpts {
|
|
|
1535
1535
|
* the runtime's own outcome routing reads.
|
|
1536
1536
|
*/
|
|
1537
1537
|
outputs?: Record<string, string>;
|
|
1538
|
-
/** Variable the whole typed response lands in. Defaults to `<id>_processResponse`. */
|
|
1539
|
-
outputVar?: string;
|
|
1540
1538
|
/** `=`-expression that skips the task when truthy. */
|
|
1541
1539
|
skipCondition?: string;
|
|
1542
1540
|
}
|
|
@@ -1569,6 +1567,8 @@ export interface HumanTaskAppOpts extends HumanTaskCommonOpts {
|
|
|
1569
1567
|
key?: string;
|
|
1570
1568
|
/** Data the task shows the human — the node's `HitlTaskArguments`. */
|
|
1571
1569
|
input?: Record<string, unknown>;
|
|
1570
|
+
/** Variable the whole typed response lands in. Defaults to `<id>_processResponse`. */
|
|
1571
|
+
outputVar?: string;
|
|
1572
1572
|
}
|
|
1573
1573
|
/**
|
|
1574
1574
|
* Options for `.humanTask()` with an INLINE form — the quick-form `Actions.HITL` task,
|
|
@@ -1593,6 +1593,14 @@ export interface HumanTaskFormOpts extends HumanTaskCommonOpts {
|
|
|
1593
1593
|
priority?: string;
|
|
1594
1594
|
/** Action Center labels, comma-separated (`labels`). */
|
|
1595
1595
|
labels?: string;
|
|
1596
|
+
/**
|
|
1597
|
+
* Not on this variant. An inline form has no whole-response output: the runtime fills
|
|
1598
|
+
* a quick form's outputs one answer at a time (`source="=<fieldId>"`, and `=Action`
|
|
1599
|
+
* for the outcome), and a `Process response` row with no source is never filled, so
|
|
1600
|
+
* its variable reads null on a real tenant. Each answer lands in its field's
|
|
1601
|
+
* `variable`; map the outcome, or anything else, with `outputs`.
|
|
1602
|
+
*/
|
|
1603
|
+
outputVar?: never;
|
|
1596
1604
|
}
|
|
1597
1605
|
/**
|
|
1598
1606
|
* Options for `.humanTask()` — an `Actions.HITL` task, backed by an Action App
|
package/dist/bpmn/bpmn-sdk.js
CHANGED
|
@@ -1697,9 +1697,14 @@ class ScopeBuilder {
|
|
|
1697
1697
|
const o = opts;
|
|
1698
1698
|
// The app variant's fields have no meaning on an inline form: the form IS the
|
|
1699
1699
|
// outcomes (`actions`) and what the human sees (`input`).
|
|
1700
|
-
|
|
1700
|
+
// Nor does `outputVar`: the app task's whole-response row has no source, which a
|
|
1701
|
+
// quick form never fills (UiPath/builder-sdk#2139), so there is nothing to name.
|
|
1702
|
+
const appOnly = ['appVersion', 'actions', 'key', 'input', 'outputVar'].filter((k) => opts[k] !== undefined);
|
|
1701
1703
|
if (appOnly.length) {
|
|
1702
|
-
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 the outcomes in form.outcomes and what the human sees in form.fields
|
|
1704
|
+
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 the outcomes in form.outcomes and what the human sees in form.fields` +
|
|
1705
|
+
(appOnly.includes('outputVar')
|
|
1706
|
+
? '; an inline form has no whole-response variable, so each answer lands in its field\'s variable and the outcome in an outputs mapping, e.g. outputs: { decision: \'=Action\' }.'
|
|
1707
|
+
: '.'));
|
|
1703
1708
|
}
|
|
1704
1709
|
const rows = quickHumanTaskRows(id, this._sugar.processId, o);
|
|
1705
1710
|
return this.pushActivity({
|
package/dist/bpmn/decompile.js
CHANGED
|
@@ -900,7 +900,6 @@ function emitQuickHumanTask(chain, el, payload) {
|
|
|
900
900
|
['priority', rest.priority !== undefined ? tsText(rest.priority) : undefined],
|
|
901
901
|
['labels', rest.labels !== undefined ? tsText(rest.labels) : undefined],
|
|
902
902
|
['outputs', record(rest.outputs)],
|
|
903
|
-
['outputVar', rest.outputVar !== undefined ? tsText(rest.outputVar) : undefined],
|
|
904
903
|
['skipCondition', payload.skipCondition !== undefined ? tsText(payload.skipCondition) : undefined],
|
|
905
904
|
['tags', tagsOf(el)],
|
|
906
905
|
['retry', emitRetry(retryOf(el))],
|
|
@@ -110,8 +110,6 @@ export interface QuickHumanTaskInput {
|
|
|
110
110
|
labels?: string;
|
|
111
111
|
/** Extra output rows: variable id → `=`-expression against the response, e.g. `{ decision: '=Action' }`. */
|
|
112
112
|
outputs?: Record<string, string>;
|
|
113
|
-
/** Variable the whole typed response lands in. Defaults to `<id>_processResponse`. */
|
|
114
|
-
outputVar?: string;
|
|
115
113
|
}
|
|
116
114
|
/** The rows a quick human task is written as. */
|
|
117
115
|
export interface QuickHumanTaskRows {
|
|
@@ -156,7 +154,7 @@ export type LiftedQuickHumanTask = QuickHumanTaskInput;
|
|
|
156
154
|
*
|
|
157
155
|
* Best effort by construction, and safe because of the last step: the lifted options
|
|
158
156
|
* are run through {@link quickHumanTaskRows} and the result must equal the node's rows,
|
|
159
|
-
* order and all. A Studio Web task (sidecar schema, `_schemaFileId
|
|
157
|
+
* order and all. A Studio Web task (sidecar schema, `_schemaFileId`)
|
|
160
158
|
* fails that and stays the verbatim `.activity()` it was.
|
|
161
159
|
*
|
|
162
160
|
* @param node - The node's rows, as decompile read them.
|
|
@@ -4,8 +4,16 @@ import { schemaId as stableSchemaId } from '../core/stable-id.js';
|
|
|
4
4
|
import { CompileRefusal } from '../core/compile-refusal.js';
|
|
5
5
|
/** The `uipath:type` version both the converter and Studio Web write for `Actions.HITL`. */
|
|
6
6
|
const QUICK_TYPE_VERSION = 'v2';
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* The app variant's whole-response row, which a quick form does NOT carry.
|
|
9
|
+
*
|
|
10
|
+
* The registry declares it with a type and no `source` (`type="Actions.HITL"`). On an
|
|
11
|
+
* app task the platform resolves that; on a quick form the runtime fills only rows with
|
|
12
|
+
* a source, so its variable stays null. A quick form therefore writes one row per answer
|
|
13
|
+
* plus `=Action` and nothing else (see {@link quickHumanTaskRows}). The name is kept only
|
|
14
|
+
* so a lift can recognise a legacy file that carries the row and keep it verbatim.
|
|
15
|
+
*/
|
|
16
|
+
const LEGACY_RESPONSE_ROW = 'Process response';
|
|
9
17
|
const DRAFT_07 = 'http://json-schema.org/draft-07/schema#';
|
|
10
18
|
/**
|
|
11
19
|
* A field id has to be a plain, unreserved identifier, for two reasons.
|
|
@@ -110,7 +118,6 @@ function validate(id, input) {
|
|
|
110
118
|
}
|
|
111
119
|
writers.set(variable, writer);
|
|
112
120
|
};
|
|
113
|
-
claim(input.outputVar ?? `${id}_processResponse`, 'the task response (outputVar)');
|
|
114
121
|
for (const f of form.fields)
|
|
115
122
|
if (isAnswer(f))
|
|
116
123
|
claim(f.variable ?? f.id, `form field "${f.id}"`);
|
|
@@ -191,13 +198,12 @@ export function quickHumanTaskRows(id, processId, input) {
|
|
|
191
198
|
{ name: 'HitlTaskArguments', type: 'json', target: 'bodyField', body: Object.fromEntries(shown.map((f) => [f.id, f.value])) },
|
|
192
199
|
];
|
|
193
200
|
const fieldById = new Map(form.fields.map((f) => [f.id, f]));
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
];
|
|
201
|
+
// One row per answer, each with its source — no sourceless whole-response row (see
|
|
202
|
+
// LEGACY_RESPONSE_ROW): the runtime never fills one on a quick form.
|
|
203
|
+
const outputRows = form.fields.filter(isAnswer).map((f) => {
|
|
204
|
+
const v = f.variable ?? f.id;
|
|
205
|
+
return { name: v, type: rowTypeOf(f.type), source: `=${f.id}`, var: v, custom: true };
|
|
206
|
+
});
|
|
201
207
|
const mappedOutputRows = Object.entries(input.outputs ?? {}).map(([v, source]) => {
|
|
202
208
|
// The fallback type: an answer's field type for `=<fieldId>`, `string` otherwise
|
|
203
209
|
// (`=Action`, the outcome NAME, is a string). A declared variable overrides it.
|
|
@@ -242,7 +248,7 @@ function bodyValue(body) {
|
|
|
242
248
|
*
|
|
243
249
|
* Best effort by construction, and safe because of the last step: the lifted options
|
|
244
250
|
* are run through {@link quickHumanTaskRows} and the result must equal the node's rows,
|
|
245
|
-
* order and all. A Studio Web task (sidecar schema, `_schemaFileId
|
|
251
|
+
* order and all. A Studio Web task (sidecar schema, `_schemaFileId`)
|
|
246
252
|
* fails that and stays the verbatim `.activity()` it was.
|
|
247
253
|
*
|
|
248
254
|
* @param node - The node's rows, as decompile read them.
|
|
@@ -285,9 +291,13 @@ export function liftQuickHumanTask(node, processId, authoredVarType = () => unde
|
|
|
285
291
|
return outcomeIdOf(name, i) === o.id ? name : { name, id: String(o.id) };
|
|
286
292
|
});
|
|
287
293
|
const schemaId = String(schema.id);
|
|
288
|
-
|
|
294
|
+
// A legacy file carries the sourceless response row. Nothing lifts it:
|
|
295
|
+
// `.humanTask({ form })` does not write it, so the node stays the verbatim
|
|
296
|
+
// `.activity()` it was rather than being silently rewritten.
|
|
297
|
+
if (node.outputRows.some((r) => r.name === LEGACY_RESPONSE_ROW && r.source === undefined))
|
|
298
|
+
return undefined;
|
|
289
299
|
const answerVars = new Set(fields.filter((f) => f.direction !== 'input').map((f) => f.variable ?? f.id));
|
|
290
|
-
const extra = node.outputRows.
|
|
300
|
+
const extra = node.outputRows.filter((r) => r.var !== undefined && !answerVars.has(r.var) && !r.custom);
|
|
291
301
|
lifted = {
|
|
292
302
|
form: { fields, outcomes, ...(schemaId !== stableSchemaId(processId, node.id) ? { schemaId } : {}) },
|
|
293
303
|
...(node.name !== undefined ? { name: node.name } : {}),
|
|
@@ -295,7 +305,6 @@ export function liftQuickHumanTask(node, processId, authoredVarType = () => unde
|
|
|
295
305
|
...(ctx.has('priority') ? { priority: ctx.get('priority').value } : {}),
|
|
296
306
|
...(ctx.has('labels') ? { labels: ctx.get('labels').value } : {}),
|
|
297
307
|
...(extra.length ? { outputs: Object.fromEntries(extra.map((r) => [r.var, r.source ?? ''])) } : {}),
|
|
298
|
-
...(response?.var !== undefined && response.var !== `${node.id}_processResponse` ? { outputVar: response.var } : {}),
|
|
299
308
|
};
|
|
300
309
|
}
|
|
301
310
|
catch {
|
package/dist/bpmn-api.md
CHANGED
|
@@ -494,6 +494,7 @@ Extends `HumanTaskCommonOpts` — its fields and methods apply here too.
|
|
|
494
494
|
- `HumanTaskAppOpts.actions?: string[]` — The outcomes a human can pick, e.g. `['approve', 'reject']`.
|
|
495
495
|
- `HumanTaskAppOpts.key?: string` — An existing task key, when resuming rather than creating (`key`).
|
|
496
496
|
- `HumanTaskAppOpts.input?: Record<string, unknown>` — Data the task shows the human — the node's `HitlTaskArguments`.
|
|
497
|
+
- `HumanTaskAppOpts.outputVar?: string` — Variable the whole typed response lands in.
|
|
497
498
|
|
|
498
499
|
### `HumanTaskFormOpts`
|
|
499
500
|
|
|
@@ -505,6 +506,7 @@ Extends `HumanTaskCommonOpts` — its fields and methods apply here too.
|
|
|
505
506
|
- `HumanTaskFormOpts.app?: never` — Not on this variant — the form replaces the app.
|
|
506
507
|
- `HumanTaskFormOpts.priority?: string` — Action Center priority, e.g. `'Medium'` (`priority`).
|
|
507
508
|
- `HumanTaskFormOpts.labels?: string` — Action Center labels, comma-separated (`labels`).
|
|
509
|
+
- `HumanTaskFormOpts.outputVar?: never` — Not on this variant.
|
|
508
510
|
|
|
509
511
|
### `JoinOpts`
|
|
510
512
|
|
|
@@ -546,7 +548,6 @@ Extends `ActivityOpts` — its fields and methods apply here too.
|
|
|
546
548
|
- `HumanTaskCommonOpts.name?: string` — Display name the designer shows on the task.
|
|
547
549
|
- `HumanTaskCommonOpts.title?: string` — The task title a human sees (`taskTitle`).
|
|
548
550
|
- `HumanTaskCommonOpts.outputs?: Record<string, string>` — Fields to pull out of the human's response into variables, e.g. `{ decision: '=Action' }`.
|
|
549
|
-
- `HumanTaskCommonOpts.outputVar?: string` — Variable the whole typed response lands in.
|
|
550
551
|
- `HumanTaskCommonOpts.skipCondition?: string` — `=`-expression that skips the task when truthy.
|
|
551
552
|
|
|
552
553
|
## Supporting types
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.120.
|
|
3
|
+
"version": "6.120.16",
|
|
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",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"@types/node": "^22.7.0",
|
|
125
125
|
"esbuild": "^0.28.1"
|
|
126
126
|
},
|
|
127
|
-
"gitref": "
|
|
127
|
+
"gitref": "2c72fa27e4abe98a71c678315b01f48a7d8efe9c"
|
|
128
128
|
}
|