@uipath/maestro-builder-sdk 6.87.2 → 6.87.3
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 +61 -61
- package/dist/api-members.md +277 -277
- package/dist/bpmn/bpmn-sdk.d.ts +19 -10
- package/dist/bpmn/bpmn-sdk.js +2 -8
- package/dist/bpmn/check.js +10 -0
- package/dist/bpmn/decompile.js +3 -3
- package/dist/core/refusals.d.ts +1 -1
- package/dist/core/refusals.js +1 -1
- package/package.json +2 -2
package/dist/bpmn/bpmn-sdk.d.ts
CHANGED
|
@@ -650,10 +650,15 @@ export interface StartOpts {
|
|
|
650
650
|
* reports that as `ERROR_START_OUTSIDE_EVENT_SUBPROCESS` rather than leaving it to
|
|
651
651
|
* be discovered at run time, because `uip maestro bpmn validate` accepts it.
|
|
652
652
|
*
|
|
653
|
-
* Interrupting is the
|
|
654
|
-
* BPMN's default and what the platform's own templates produce.
|
|
655
|
-
*
|
|
656
|
-
*
|
|
653
|
+
* Interrupting is the form to author: `isInterrupting` is left unset, which is
|
|
654
|
+
* BPMN's default and what the platform's own templates produce. On a
|
|
655
|
+
* NON-interrupting error start the engine never starts the event sub-process: both
|
|
656
|
+
* the platform (`EventSubProcessPredicates.IsInterruptingErrorEventSubProcess`) and
|
|
657
|
+
* the local engine require an interrupting error start, so the handler does not run
|
|
658
|
+
* and the error faults the scope. Deployed processes still carry
|
|
659
|
+
* `isInterrupting="false"` on one and `uip maestro bpmn validate` accepts it, so
|
|
660
|
+
* `interrupting: false` is kept as written and `check` warns
|
|
661
|
+
* (BPMN_ERROR_START_NOT_INTERRUPTING). Drop it to make the handler run.
|
|
657
662
|
*/
|
|
658
663
|
error?: ErrorLike;
|
|
659
664
|
/** Start on a timer — an ISO-8601 duration string, or a full {@link TimerSpec}. */
|
|
@@ -712,9 +717,11 @@ export interface StartOpts {
|
|
|
712
717
|
* `false` makes a message or timer start NON-interrupting: the event sub-process it
|
|
713
718
|
* starts runs beside the container instead of cancelling it (`isInterrupting="false"`).
|
|
714
719
|
*
|
|
715
|
-
* Only meaningful on the start event of an event sub-process
|
|
716
|
-
* `error` start
|
|
717
|
-
*
|
|
720
|
+
* Only meaningful on the start event of an event sub-process. Never set it on an
|
|
721
|
+
* `error` start: the engine never starts the event sub-process, so the handler does
|
|
722
|
+
* not run and the error faults the scope. It is still written as given there
|
|
723
|
+
* (deployed processes carry it), and `check` warns (BPMN_ERROR_START_NOT_INTERRUPTING).
|
|
724
|
+
* Defaults to `true`, the BPMN default, which writes no attribute.
|
|
718
725
|
* {@link ScopeBuilder.eventSubProcess} sets this from its own `interrupting` option.
|
|
719
726
|
*/
|
|
720
727
|
interrupting?: boolean;
|
|
@@ -1980,7 +1987,9 @@ export interface EventSubProcessOpts {
|
|
|
1980
1987
|
/**
|
|
1981
1988
|
* For a `message` or `timer` start: `false` lets the container keep running while
|
|
1982
1989
|
* the sub-process handles the event (`isInterrupting="false"`). Defaults to `true`.
|
|
1983
|
-
*
|
|
1990
|
+
* Do not set it with `error`: the engine never starts the event sub-process, so the
|
|
1991
|
+
* handler does not run and the error faults the scope. It is written as given
|
|
1992
|
+
* (deployed processes carry it) and `check` warns (BPMN_ERROR_START_NOT_INTERRUPTING).
|
|
1984
1993
|
*/
|
|
1985
1994
|
interrupting?: boolean;
|
|
1986
1995
|
/**
|
|
@@ -3130,8 +3139,8 @@ declare abstract class ScopeBuilder {
|
|
|
3130
3139
|
* @param opts - What starts it — exactly one of `error` / `message` / `timer` — and the rest of {@link EventSubProcessOpts}.
|
|
3131
3140
|
* @param fn - Receives the body builder; elements chain in the order they are written.
|
|
3132
3141
|
* @returns This builder, so calls chain.
|
|
3133
|
-
* @throws If none or several of `error` / `message` / `timer` are given, if
|
|
3134
|
-
*
|
|
3142
|
+
* @throws If none or several of `error` / `message` / `timer` are given, or if a path in the
|
|
3143
|
+
* body is left open.
|
|
3135
3144
|
*/
|
|
3136
3145
|
eventSubProcess(id: string, opts: EventSubProcessOpts, fn: (sp: SubProcessBuilder) => void): this;
|
|
3137
3146
|
/**
|
package/dist/bpmn/bpmn-sdk.js
CHANGED
|
@@ -716,9 +716,6 @@ class ScopeBuilder {
|
|
|
716
716
|
if (opts.trigger !== undefined && opts.payload !== undefined) {
|
|
717
717
|
throw new CompileRefusal('BPMN_START_TRIGGER_AND_PAYLOAD', `startEvent "${id}": \`trigger\` and \`payload\` both write the event's extension element; pass one.`);
|
|
718
718
|
}
|
|
719
|
-
if (opts.interrupting === false && opts.error !== undefined) {
|
|
720
|
-
throw new CompileRefusal('BPMN_ERROR_START_NOT_INTERRUPTING', `startEvent "${id}": an error start is always interrupting — the throw has already ended the scope it came from.`);
|
|
721
|
-
}
|
|
722
719
|
return this.push({
|
|
723
720
|
kind: 'startEvent',
|
|
724
721
|
id,
|
|
@@ -2073,17 +2070,14 @@ class ScopeBuilder {
|
|
|
2073
2070
|
* @param opts - What starts it — exactly one of `error` / `message` / `timer` — and the rest of {@link EventSubProcessOpts}.
|
|
2074
2071
|
* @param fn - Receives the body builder; elements chain in the order they are written.
|
|
2075
2072
|
* @returns This builder, so calls chain.
|
|
2076
|
-
* @throws If none or several of `error` / `message` / `timer` are given, if
|
|
2077
|
-
*
|
|
2073
|
+
* @throws If none or several of `error` / `message` / `timer` are given, or if a path in the
|
|
2074
|
+
* body is left open.
|
|
2078
2075
|
*/
|
|
2079
2076
|
eventSubProcess(id, opts, fn) {
|
|
2080
2077
|
const given = [opts.error !== undefined, opts.message !== undefined, opts.timer !== undefined].filter(Boolean).length;
|
|
2081
2078
|
if (given !== 1) {
|
|
2082
2079
|
throw new CompileRefusal('BPMN_EVENT_SUBPROCESS_START_COUNT', `eventSubProcess "${id}" needs exactly one of { error, message, timer } — that is what starts it.`);
|
|
2083
2080
|
}
|
|
2084
|
-
if (opts.error !== undefined && opts.interrupting === false) {
|
|
2085
|
-
throw new CompileRefusal('BPMN_ERROR_START_NOT_INTERRUPTING', `eventSubProcess "${id}": an error start is always interrupting — the throw has already ended the scope it came from.`);
|
|
2086
|
-
}
|
|
2087
2081
|
if (opts.errorVar !== undefined && opts.errorVar !== false && opts.error === undefined) {
|
|
2088
2082
|
throw new CompileRefusal('BPMN_ERROR_VAR_WITHOUT_ERROR', `eventSubProcess "${id}": \`errorVar\` captures an error, so it needs \`error\`.`);
|
|
2089
2083
|
}
|
package/dist/bpmn/check.js
CHANGED
|
@@ -1451,6 +1451,16 @@ inEventSubProcess = false) {
|
|
|
1451
1451
|
where: n.id,
|
|
1452
1452
|
});
|
|
1453
1453
|
}
|
|
1454
|
+
// Dead handler: both engines start an error ESP only when its start is interrupting.
|
|
1455
|
+
if (n.kind === 'startEvent' && n.event?.type === 'error' && n.interrupting === false) {
|
|
1456
|
+
diags.push({
|
|
1457
|
+
level: 'warning',
|
|
1458
|
+
code: 'BPMN_ERROR_START_NOT_INTERRUPTING',
|
|
1459
|
+
message: `Error start event "${n.id}" is marked non-interrupting, so the engine never starts this event ` +
|
|
1460
|
+
'sub-process and the error faults the scope. Drop `interrupting: false`.',
|
|
1461
|
+
where: n.id,
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1454
1464
|
if (n.kind !== 'subProcess' && 'event' in n && n.event?.type === 'timer') {
|
|
1455
1465
|
const t = n.event.timer;
|
|
1456
1466
|
const blank = [t.duration, t.date, t.cycle].find(isBlankTimerValue) !== undefined;
|
package/dist/bpmn/decompile.js
CHANGED
|
@@ -1741,8 +1741,6 @@ function renderEventSubProcess(plan, sp, depth, indent) {
|
|
|
1741
1741
|
const def = singleDefinition(start);
|
|
1742
1742
|
if (!def)
|
|
1743
1743
|
return reject('its start carries no single error, timer or message definition');
|
|
1744
|
-
if (def === 'error' && start.isInterrupting === false)
|
|
1745
|
-
return reject('a non-interrupting error start is not a thing');
|
|
1746
1744
|
const outs = g.outs.get(start.id) ?? [];
|
|
1747
1745
|
if (outs.length !== 1)
|
|
1748
1746
|
return reject(`its start has ${outs.length} outgoing flows`);
|
|
@@ -1803,7 +1801,9 @@ function renderEventSubProcess(plan, sp, depth, indent) {
|
|
|
1803
1801
|
const optsText = opts([
|
|
1804
1802
|
['name', sp.name !== undefined ? tsText(sp.name) : undefined],
|
|
1805
1803
|
[def, defExpr],
|
|
1806
|
-
|
|
1804
|
+
// Written for an error start too: a deployed one can carry `isInterrupting="false"`
|
|
1805
|
+
// (which makes it a dead handler; check warns), and dropping it would change the file.
|
|
1806
|
+
['interrupting', start.isInterrupting === false ? 'false' : undefined],
|
|
1807
1807
|
// `` `${id}_Error` `` is compile's default and `false` its opt-out, so neither is
|
|
1808
1808
|
// left implicit the wrong way round: an error start with no capture row recompiles
|
|
1809
1809
|
// without one, and a capture the designer named something else is spelled out.
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export declare const REFUSALS: {
|
|
|
83
83
|
readonly BPMN_DUP_BOUNDARY_ID: "lowering";
|
|
84
84
|
readonly BPMN_DUP_ERROR_CATCH: "lowering";
|
|
85
85
|
readonly BPMN_ERROR_NAME_EMPTY: "lowering";
|
|
86
|
-
readonly BPMN_ERROR_START_NOT_INTERRUPTING: "
|
|
86
|
+
readonly BPMN_ERROR_START_NOT_INTERRUPTING: "lint";
|
|
87
87
|
readonly BPMN_ERROR_VAR_AND_PAYLOAD: "lowering";
|
|
88
88
|
readonly BPMN_ERROR_VAR_WITHOUT_ERROR: "lowering";
|
|
89
89
|
readonly BPMN_EVENT_BINDINGS_MISSING: "lowering";
|
package/dist/core/refusals.js
CHANGED
|
@@ -132,7 +132,7 @@ export const REFUSALS = {
|
|
|
132
132
|
BPMN_DUP_BOUNDARY_ID: 'lowering',
|
|
133
133
|
BPMN_DUP_ERROR_CATCH: 'lowering',
|
|
134
134
|
BPMN_ERROR_NAME_EMPTY: 'lowering',
|
|
135
|
-
BPMN_ERROR_START_NOT_INTERRUPTING: '
|
|
135
|
+
BPMN_ERROR_START_NOT_INTERRUPTING: 'lint',
|
|
136
136
|
BPMN_ERROR_VAR_AND_PAYLOAD: 'lowering',
|
|
137
137
|
BPMN_ERROR_VAR_WITHOUT_ERROR: 'lowering',
|
|
138
138
|
BPMN_EVENT_BINDINGS_MISSING: 'lowering',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.87.
|
|
3
|
+
"version": "6.87.3",
|
|
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",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"@types/node": "^22.7.0",
|
|
111
111
|
"esbuild": "^0.28.1"
|
|
112
112
|
},
|
|
113
|
-
"gitref": "
|
|
113
|
+
"gitref": "39ebb67c20d4fbb730c1c5345fff135c19dcf34b"
|
|
114
114
|
}
|