@uipath/maestro-builder-sdk 6.120.17 → 6.120.18

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.
@@ -1541,34 +1541,51 @@ export interface HumanTaskCommonOpts extends ActivityOpts {
1541
1541
  /**
1542
1542
  * Options for `.humanTask()` backed by an Action App — an `Actions.HITL` action-app task.
1543
1543
  *
1544
- * `app` is the Action App's id and the registry marks it the type's primary key,
1545
- * so it comes from the tenant (`RequiresDiscovery: Yes`). Nothing offline can
1546
- * resolve it: pass the id, or a `=bindings.<id>` reference so it is configurable
1547
- * per environment. With no app on the tenant, use {@link HumanTaskFormOpts} instead.
1544
+ * The app is addressed by its NAME and FOLDER PATH, the way Studio Web saves the task:
1545
+ * `uipath:type version="v2"`, `name` and `folderPath` context inputs that are
1546
+ * `=bindings.<id>` references, and two `resource="app"` bindings (`propertyAttribute`
1547
+ * `name` and `folderPath`) keyed `<folder>.<app>`. The SDK declares the bindings for you
1548
+ * from the two plain values, so each is overridable per environment at deploy time.
1549
+ *
1550
+ * Both come from the tenant (`RequiresDiscovery: Yes`): the app as Action Center lists
1551
+ * it, and the Orchestrator folder it is deployed to. With no app on the tenant, use
1552
+ * {@link HumanTaskFormOpts} instead.
1553
+ *
1554
+ * @remarks
1555
+ * **Not an app id.** Before UiPath/builder-sdk#2144 `app` was the app's id and the task
1556
+ * was written at `version="v1"` with an `appId` context input. The V2 engine never reads
1557
+ * `appId`: it resolves the app only from `name`/`folderPath` at v2, and fails a v1 task
1558
+ * with 170000. `folder` is required so a program written against the old meaning is
1559
+ * refused (`BPMN_HUMAN_TASK_APP_NO_FOLDER`) rather than compiled into a task that looks
1560
+ * up an app NAMED like the id.
1548
1561
  */
1549
1562
  export interface HumanTaskAppOpts extends HumanTaskCommonOpts {
1550
- /** The Action App's id (`appId`). Tenant-specific — see the remarks above. */
1563
+ /**
1564
+ * The Action App's name, e.g. `'InvoiceApproval'` — the context's `name`. Or an
1565
+ * `=bindings.<id>` reference to an `app` / `name` binding you declared.
1566
+ */
1551
1567
  app: string;
1552
- /** Not on this variant — see {@link HumanTaskFormOpts}. */
1553
- form?: never;
1554
- /** The app version (`appVersion`). */
1555
- appVersion?: number;
1556
1568
  /**
1557
- * The outcomes a human can pick, e.g. `['approve', 'reject']`.
1558
- *
1559
- * Joined with commas. The registry types this field as a bare `string` and says
1560
- * nothing about its encoding, and `uip maestro bpmn validate` accepts a
1561
- * comma-joined list, a JSON array, a single word and an empty string alike — so
1562
- * this is the plausible reading, not a verified one. If a LIVE run mis-reads the
1563
- * outcomes, this is the first thing to compare against a Studio Web export.
1569
+ * The Orchestrator folder path the app is deployed to, e.g. `'Shared'` or
1570
+ * `'Finance/Invoices'` — the context's `folderPath`. Or an `=bindings.<id>` reference
1571
+ * to an `app` / `folderPath` binding you declared.
1564
1572
  */
1565
- actions?: string[];
1566
- /** An existing task key, when resuming rather than creating (`key`). */
1567
- key?: string;
1573
+ folder: string;
1574
+ /** Not on this variant — see {@link HumanTaskFormOpts}. */
1575
+ form?: never;
1568
1576
  /** Data the task shows the human — the node's `HitlTaskArguments`. */
1569
1577
  input?: Record<string, unknown>;
1570
1578
  /** Variable the whole typed response lands in. Defaults to `<id>_processResponse`. */
1571
1579
  outputVar?: string;
1580
+ /**
1581
+ * Removed (#2144): a v1 `appId`-task field the V2 engine never reads. The app defines
1582
+ * its own outcomes; read the one picked with `outputs: { decision: '=Action' }`.
1583
+ */
1584
+ actions?: never;
1585
+ /** Removed (#2144): a v1 `appId`-task field the V2 engine never reads. */
1586
+ appVersion?: never;
1587
+ /** Removed (#2144): a v1 `appId`-task field the V2 engine never reads. */
1588
+ key?: never;
1572
1589
  }
1573
1590
  /**
1574
1591
  * Options for `.humanTask()` with an INLINE form — the quick-form `Actions.HITL` task,
@@ -1589,6 +1606,8 @@ export interface HumanTaskFormOpts extends HumanTaskCommonOpts {
1589
1606
  form: HumanTaskForm;
1590
1607
  /** Not on this variant — the form replaces the app. */
1591
1608
  app?: never;
1609
+ /** Not on this variant — there is no app to look up in a folder. */
1610
+ folder?: never;
1592
1611
  /** Action Center priority, e.g. `'Medium'` (`priority`). */
1593
1612
  priority?: string;
1594
1613
  /** Action Center labels, comma-separated (`labels`). */
@@ -2970,9 +2989,10 @@ declare abstract class ScopeBuilder {
2970
2989
  * @remarks
2971
2990
  * **Pick the variant by whether an app is named.** With no deployed Action App named,
2972
2991
  * use `form: { fields, outcomes }` ({@link HumanTaskFormOpts}): the form travels in the
2973
- * `.bpmn` and nothing on the tenant has to exist. Use `app` ({@link HumanTaskAppOpts})
2974
- * only when the request names a deployed app — an app id that is not on the tenant fails
2975
- * `uip maestro bpmn validate` with `MISSING_BINDING` / `MISSING_RESOURCE`.
2992
+ * `.bpmn` and nothing on the tenant has to exist. Use `app` and `folder`
2993
+ * ({@link HumanTaskAppOpts}) only when the request names a deployed app: the app's name
2994
+ * and the folder path it is deployed to. The SDK writes them as the two `app` bindings
2995
+ * Studio Web saves, so a deploy can point the task at another environment's app.
2976
2996
  *
2977
2997
  * The offline runtime can stand in for the human — `--hitl-response` injects an
2978
2998
  * outcome — so an approval gate's branches are testable with no tenant and no
@@ -2993,9 +3013,9 @@ declare abstract class ScopeBuilder {
2993
3013
  * .var('outcome', 'string', { default: 'none' })
2994
3014
  * .startEvent('start')
2995
3015
  * .humanTask('approve', {
2996
- * app: 'app-123',
3016
+ * app: 'InvoiceApproval',
3017
+ * folder: 'Shared',
2997
3018
  * title: 'Approve the invoice',
2998
- * actions: ['approve', 'reject'],
2999
3019
  * input: { amount: 100 },
3000
3020
  * outputs: { decision: '=Action' },
3001
3021
  * })
@@ -3674,7 +3694,7 @@ export declare class PathBuilder extends ScopeBuilder {
3674
3694
  * bpmn('approval')
3675
3695
  * .var('reminded', 'string')
3676
3696
  * .startEvent('start')
3677
- * .humanTask('approve', { app: 'InvoiceApproval', actions: ['Approve', 'Reject'] }, (t) => {
3697
+ * .humanTask('approve', { app: 'InvoiceApproval', folder: 'Shared' }, (t) => {
3678
3698
  * t.onTimer('PT1H', { interrupting: false }, (b) =>
3679
3699
  * b.task('remind', { set: { reminded: 'true' } }).endEvent('reminded'));
3680
3700
  * t.onError((b) => b.endEvent('failed', { name: 'Approval failed' }));
@@ -14,6 +14,19 @@ export { connectorOutputVars, nodeDeclaredVars, typedNodeDeclaredVars } from './
14
14
  function normTimer(t) {
15
15
  return typeof t === 'string' ? { duration: t } : t;
16
16
  }
17
+ /**
18
+ * The `uipath:type` version of an app-backed `.humanTask()`. PO.BpmnEngine
19
+ * (`AppTasksCreateArgs`) reads the app from `name`/`folderPath` only on `v2`; on `v1` it
20
+ * reads no app at all and the AppTasks request fails with 170000 (UiPath/cli#5940).
21
+ */
22
+ const HITL_APP_TYPE_VERSION = 'v2';
23
+ /**
24
+ * How an app-backed `.humanTask()` keys its `app` binding pair: `<folderPath>.<name>`,
25
+ * Studio Web's fallback when the task carries no tenant key (`useAddTaskInfoToBindings`),
26
+ * e.g. `Shared.InvoiceApproval`. The registry's own pattern, `${metadata.key}`, names the
27
+ * app's tenant key, which nothing offline has.
28
+ */
29
+ const HITL_APP_RESOURCE_KEY_PATTERN = '${metadata.folderPath}.${metadata.name}';
17
30
  /** Every {@link PlainTaskElement}, for the run-time check in `.plainTask()`. */
18
31
  const PLAIN_TASK_ELEMENTS = new Set([
19
32
  'bpmn:callActivity', 'bpmn:task', 'bpmn:userTask', 'bpmn:serviceTask', 'bpmn:sendTask', 'bpmn:manualTask', 'bpmn:businessRuleTask', 'bpmn:receiveTask',
@@ -1283,7 +1296,9 @@ class ScopeBuilder {
1283
1296
  * right. An author who passes an `=`-expression already knows what they want and
1284
1297
  * is left alone.
1285
1298
  */
1286
- bindRequiredContext(id, type, context) {
1299
+ bindRequiredContext(id, type, context,
1300
+ /** A key pattern to use in place of the registry's, for a type whose own one names nothing an author has. */
1301
+ keyPattern) {
1287
1302
  const out = { ...context };
1288
1303
  for (const field of bindingRequiredFields(type)) {
1289
1304
  const value = out[field.name];
@@ -1297,7 +1312,7 @@ class ScopeBuilder {
1297
1312
  // (`${metadata.key}`, the live registry's pattern on a job start, whose context
1298
1313
  // has no `key`) leaves the key to the value, as before. This snapshot carries no
1299
1314
  // pattern for the job starts at all; `resource-key-pattern.ts` is tested on both.
1300
- const keyed = this.resourceKeyFromPattern(id, type, field, context);
1315
+ const keyed = this.resourceKeyFromPattern(id, type, field, context, keyPattern);
1301
1316
  this._bindingRegistry.declare({
1302
1317
  id: bindingId,
1303
1318
  name: field.displayName ?? field.name,
@@ -1339,8 +1354,8 @@ class ScopeBuilder {
1339
1354
  * `.binding()` before this node declares with a value: that key would otherwise be
1340
1355
  * built, so the author is told what to declare rather than given a wrong pair.
1341
1356
  */
1342
- resourceKeyFromPattern(id, type, field, context) {
1343
- const pattern = field.bindingInfo?.resourceKeyPattern;
1357
+ resourceKeyFromPattern(id, type, field, context, keyPattern) {
1358
+ const pattern = keyPattern ?? field.bindingInfo?.resourceKeyPattern;
1344
1359
  const byId = (bindingId) => this._bindingRegistry.bindings.find((b) => b.id === bindingId);
1345
1360
  const resolved = resolveResourceKeyPattern(pattern, context, byId);
1346
1361
  if (resolved === undefined)
@@ -1611,9 +1626,10 @@ class ScopeBuilder {
1611
1626
  * @remarks
1612
1627
  * **Pick the variant by whether an app is named.** With no deployed Action App named,
1613
1628
  * use `form: { fields, outcomes }` ({@link HumanTaskFormOpts}): the form travels in the
1614
- * `.bpmn` and nothing on the tenant has to exist. Use `app` ({@link HumanTaskAppOpts})
1615
- * only when the request names a deployed app — an app id that is not on the tenant fails
1616
- * `uip maestro bpmn validate` with `MISSING_BINDING` / `MISSING_RESOURCE`.
1629
+ * `.bpmn` and nothing on the tenant has to exist. Use `app` and `folder`
1630
+ * ({@link HumanTaskAppOpts}) only when the request names a deployed app: the app's name
1631
+ * and the folder path it is deployed to. The SDK writes them as the two `app` bindings
1632
+ * Studio Web saves, so a deploy can point the task at another environment's app.
1617
1633
  *
1618
1634
  * The offline runtime can stand in for the human — `--hitl-response` injects an
1619
1635
  * outcome — so an approval gate's branches are testable with no tenant and no
@@ -1634,9 +1650,9 @@ class ScopeBuilder {
1634
1650
  * .var('outcome', 'string', { default: 'none' })
1635
1651
  * .startEvent('start')
1636
1652
  * .humanTask('approve', {
1637
- * app: 'app-123',
1653
+ * app: 'InvoiceApproval',
1654
+ * folder: 'Shared',
1638
1655
  * title: 'Approve the invoice',
1639
- * actions: ['approve', 'reject'],
1640
1656
  * input: { amount: 100 },
1641
1657
  * outputs: { decision: '=Action' },
1642
1658
  * })
@@ -1688,20 +1704,30 @@ class ScopeBuilder {
1688
1704
  * @returns This builder, so calls chain.
1689
1705
  */
1690
1706
  humanTask(id, opts, body) {
1691
- const hasApp = opts.app !== undefined;
1692
- const hasForm = opts.form !== undefined;
1707
+ const given = opts;
1708
+ const hasApp = given.app !== undefined;
1709
+ const hasForm = given.form !== undefined;
1693
1710
  if (hasApp === hasForm) {
1694
1711
  throw new CompileRefusal('BPMN_HUMAN_TASK_APP_XOR_FORM', `humanTask "${id}": pass exactly one of app (a deployed Action App) or form ({ fields, outcomes }, an inline form that needs no app).`);
1695
1712
  }
1713
+ // The v1 app task's own fields (UiPath/builder-sdk#2144). The V2 engine reads none of
1714
+ // them on either variant: an app's outcomes are the app's, a form's are form.outcomes.
1715
+ const v1Fields = ['appVersion', 'actions', 'key'].filter((k) => given[k] !== undefined);
1716
+ if (v1Fields.length) {
1717
+ throw new CompileRefusal('BPMN_HUMAN_TASK_APP_V1_FIELDS', `humanTask "${id}": ${v1Fields.join(', ')} belong to the retired v1 app task (addressed by appId), which the V2 engine never reads. ` +
1718
+ (hasForm
1719
+ ? 'On an inline form, put the outcomes in form.outcomes and what the human sees in form.fields.'
1720
+ : 'Drop them: the app defines its own outcomes, and outputs: { decision: \'=Action\' } reads the one the human picked.'));
1721
+ }
1696
1722
  if (hasForm) {
1697
1723
  const o = opts;
1698
- // The app variant's fields have no meaning on an inline form: the form IS the
1699
- // outcomes (`actions`) and what the human sees (`input`).
1724
+ // The app variant's fields have no meaning on an inline form: the form IS what the
1725
+ // human sees (`input`), and there is no app to look up (`folder`).
1700
1726
  // 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);
1727
+ // quick form never fills, so there is nothing to name.
1728
+ const appOnly = ['folder', 'input', 'outputVar'].filter((k) => given[k] !== undefined);
1703
1729
  if (appOnly.length) {
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` +
1730
+ 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` +
1705
1731
  (appOnly.includes('outputVar')
1706
1732
  ? '; 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
1733
  : '.'));
@@ -1727,27 +1753,36 @@ class ScopeBuilder {
1727
1753
  loop: o.loop,
1728
1754
  }, body);
1729
1755
  }
1730
- opts = opts;
1756
+ const o = opts;
1757
+ if (typeof o.folder !== 'string' || o.folder === '') {
1758
+ throw new CompileRefusal('BPMN_HUMAN_TASK_APP_NO_FOLDER', `humanTask "${id}": an Action App is addressed by its name and the folder it is deployed to — pass both, e.g. ` +
1759
+ `{ app: 'InvoiceApproval', folder: 'Shared' } (or =bindings.<id> references to app bindings). ` +
1760
+ `app is the app's NAME, not its id: the V2 engine never reads an appId and fails such a task with 170000 (UiPath/builder-sdk#2144).`);
1761
+ }
1762
+ // Studio Web's app task (`useActionsProperties` / `useAddTaskInfoToBindings`): v2,
1763
+ // `name` and `folderPath` as `=bindings.<id>` references to a `resource="app"` pair.
1764
+ // The registry keys that pair `${metadata.key}`, the app's tenant key, which an author
1765
+ // offline does not have; Studio Web falls back to `<folderPath>.<name>` when the task
1766
+ // carries no key, and every app binding it saves is keyed that way.
1731
1767
  return this.pushActivity({
1732
1768
  kind: 'typed',
1733
1769
  id,
1734
- name: opts.name,
1770
+ name: o.name,
1735
1771
  type: 'Actions.HITL',
1736
- context: {
1737
- appId: opts.app,
1738
- ...(opts.appVersion !== undefined ? { appVersion: opts.appVersion } : {}),
1739
- ...(opts.actions !== undefined ? { actions: opts.actions.join(',') } : {}),
1740
- ...(opts.title !== undefined ? { taskTitle: opts.title } : {}),
1741
- ...(opts.key !== undefined ? { key: opts.key } : {}),
1742
- },
1743
- inputs: opts.input ?? {},
1744
- outputVar: opts.outputVar,
1745
- outputs: opts.outputs,
1746
- skipCondition: opts.skipCondition,
1747
- tags: opts.tags,
1748
- retry: opts.retry,
1749
- errorMapping: opts.errorMapping,
1750
- loop: opts.loop,
1772
+ typeVersion: HITL_APP_TYPE_VERSION,
1773
+ context: this.bindRequiredContext(id, 'Actions.HITL', {
1774
+ name: o.app,
1775
+ folderPath: o.folder,
1776
+ ...(o.title !== undefined ? { taskTitle: o.title } : {}),
1777
+ }, HITL_APP_RESOURCE_KEY_PATTERN),
1778
+ inputs: o.input ?? {},
1779
+ outputVar: o.outputVar,
1780
+ outputs: o.outputs,
1781
+ skipCondition: o.skipCondition,
1782
+ tags: o.tags,
1783
+ retry: o.retry,
1784
+ errorMapping: o.errorMapping,
1785
+ loop: o.loop,
1751
1786
  }, body);
1752
1787
  }
1753
1788
  /**
@@ -2705,7 +2740,7 @@ export class PathBuilder extends ScopeBuilder {
2705
2740
  * bpmn('approval')
2706
2741
  * .var('reminded', 'string')
2707
2742
  * .startEvent('start')
2708
- * .humanTask('approve', { app: 'InvoiceApproval', actions: ['Approve', 'Reject'] }, (t) => {
2743
+ * .humanTask('approve', { app: 'InvoiceApproval', folder: 'Shared' }, (t) => {
2709
2744
  * t.onTimer('PT1H', { interrupting: false }, (b) =>
2710
2745
  * b.task('remind', { set: { reminded: 'true' } }).endEvent('reminded'));
2711
2746
  * t.onError((b) => b.endEvent('failed', { name: 'Approval failed' }));
@@ -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
- const quickHitl = n.type === 'Actions.HITL' &&
1822
- (contextView['hitlType'] === 'quick' ||
1823
- (contextView['hitlType'] !== 'custom' && Object.keys(contextView).some((k) => HITL_QUICK_SCHEMA_CONTEXT.has(k))));
1824
- // `appId` is a deliberate, narrow LOOSENING of the platform's list, and the one
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,
@@ -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": "appId",
93
- "displayName": null,
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": false,
98
+ "required": true,
116
99
  "hidden": true,
117
- "binding": false,
100
+ "binding": true,
118
101
  "default": null,
119
- "bindingInfo": null
102
+ "bindingInfo": {
103
+ "resource": "app",
104
+ "propertyAttribute": "name",
105
+ "resourceKeyPattern": "${metadata.key}"
106
+ }
120
107
  },
121
108
  {
122
- "name": "key",
109
+ "name": "folderPath",
123
110
  "displayName": null,
124
111
  "type": "string",
125
- "required": false,
112
+ "required": true,
126
113
  "hidden": true,
127
- "binding": false,
114
+ "binding": true,
128
115
  "default": null,
129
- "bindingInfo": null
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": "none",
143
+ "bindingPattern": "app",
153
144
  "placements": {
154
145
  "Activity": {
155
146
  "element": "bpmn:UserTask",
package/dist/bpmn-api.md CHANGED
@@ -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 id (`appId`).
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.
@@ -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";
@@ -416,6 +418,7 @@ export declare const REFUSALS: {
416
418
  readonly HITL_APP_NO_SCHEMA: "lint";
417
419
  readonly HITL_APP_OUTCOME_UNKNOWN: "lowering";
418
420
  readonly HITL_APP_SCHEMA_INVALID: "lowering";
421
+ readonly HITL_APP_V1: "lint";
419
422
  readonly HITL_APP_WITHOUT_VARIANT: "lowering";
420
423
  readonly HITL_APP_WITH_FIELDS: "lint";
421
424
  readonly HITL_CHANNEL_UNKNOWN: "lint";
@@ -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',
@@ -492,6 +494,7 @@ export const REFUSALS = {
492
494
  HITL_APP_NO_SCHEMA: 'lint',
493
495
  HITL_APP_OUTCOME_UNKNOWN: 'lowering',
494
496
  HITL_APP_SCHEMA_INVALID: 'lowering',
497
+ HITL_APP_V1: 'lint',
495
498
  HITL_APP_WITHOUT_VARIANT: 'lowering',
496
499
  HITL_APP_WITH_FIELDS: 'lint',
497
500
  HITL_CHANNEL_UNKNOWN: 'lint',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.120.17",
3
+ "version": "6.120.18",
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": "9f8380b59b3b445b01bf0b09b0a4a964ae9c19d7"
127
+ "gitref": "5c8f71e82c53ef622bf0335c6d0bc846c8c77aed"
128
128
  }