@uipath/packager-tool-bpmn 1.199.0-preview.97 → 1.200.0-preview.109
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/index.js +46 -8
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2212,8 +2212,8 @@ var bpmn_spec_default = {
|
|
|
2212
2212
|
<bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
|
|
2213
2213
|
</bpmn:Task>`,
|
|
2214
2214
|
inputNotes: "Variable mappings use uipath:mapping with direct input/output elements, not a jsonBody pattern",
|
|
2215
|
-
bpmnElementNotes: "Also used on bpmn:StartEvent and bpmn:
|
|
2216
|
-
extensionTagNotes: "Uses uipath:mapping (not uipath:activity).
|
|
2215
|
+
bpmnElementNotes: "Also used on bpmn:StartEvent, bpmn:EndEvent, bpmn:ScriptTask, and bpmn:SubProcess for variable mappings. On bpmn:Task with no serviceType, defaults to BPMN.Variables.",
|
|
2216
|
+
extensionTagNotes: "Uses uipath:mapping (not uipath:activity). BPMN.Variables mappings are supported on StartEvent, EndEvent, Task, ScriptTask, and SubProcess owners."
|
|
2217
2217
|
},
|
|
2218
2218
|
"BPMN.ScriptTask": {
|
|
2219
2219
|
extensionType: "BPMN.ScriptTask",
|
|
@@ -2954,8 +2954,13 @@ var SUPPORTED_UIPATH_EXTENSION_TAG_NAMES = Object.freeze([
|
|
|
2954
2954
|
])
|
|
2955
2955
|
].sort());
|
|
2956
2956
|
var SUPPORTED_UIPATH_EXTENSION_TAGS = Object.freeze(SUPPORTED_UIPATH_EXTENSION_TAG_NAMES.map((tag) => `uipath:${tag}`));
|
|
2957
|
+
var GUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
2958
|
+
function isGuid(value) {
|
|
2959
|
+
return GUID_REGEX.test(value);
|
|
2960
|
+
}
|
|
2957
2961
|
var KNOWN_UIPATH_TAGS = new Set(SUPPORTED_UIPATH_EXTENSION_TAGS);
|
|
2958
2962
|
var SEMANTIC_VALIDATION_ERROR = "BPMN_VALIDATION_ERROR";
|
|
2963
|
+
var BPMN_MODEL_NAMESPACE = "http://www.omg.org/spec/BPMN/20100524/MODEL";
|
|
2959
2964
|
|
|
2960
2965
|
class BpmnValidateService {
|
|
2961
2966
|
fileSystem;
|
|
@@ -3059,11 +3064,30 @@ class BpmnValidateService {
|
|
|
3059
3064
|
instruction: "Add a bpmn:StartEvent to each process."
|
|
3060
3065
|
});
|
|
3061
3066
|
}
|
|
3067
|
+
this.validateRootEntryPointIds(file, process, diagnostics);
|
|
3062
3068
|
}
|
|
3063
3069
|
const availableBindings = new Map(bindings);
|
|
3064
3070
|
collectInlineBindings(definitions, availableBindings);
|
|
3065
3071
|
this.validateUiPathTags(file, definitions, availableBindings, diagnostics);
|
|
3066
3072
|
}
|
|
3073
|
+
validateRootEntryPointIds(file, process, diagnostics) {
|
|
3074
|
+
const rootStartEvents = findChildren(process, (node) => hasLocalName(node, "startEvent"));
|
|
3075
|
+
for (const startEvent of rootStartEvents) {
|
|
3076
|
+
const entryPointIds = findDescendants(startEvent, (node) => node.name === "uipath:entryPointId");
|
|
3077
|
+
for (const entryPointId of entryPointIds) {
|
|
3078
|
+
const value = entryPointId.attributes.value ?? "";
|
|
3079
|
+
if (isGuid(value)) {
|
|
3080
|
+
continue;
|
|
3081
|
+
}
|
|
3082
|
+
diagnostics.push({
|
|
3083
|
+
file,
|
|
3084
|
+
element: describeElement(startEvent),
|
|
3085
|
+
message: `Root start event uipath:entryPointId value "${value}" must be a GUID.`,
|
|
3086
|
+
instruction: "Set uipath:entryPointId value to a GUID and use the same value for the matching entry-points.json uniqueId."
|
|
3087
|
+
});
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3067
3091
|
validateUiPathTags(file, root, bindings, diagnostics) {
|
|
3068
3092
|
const uipathNodes = findDescendants(root, (node) => node.name.startsWith("uipath:"));
|
|
3069
3093
|
for (const node of uipathNodes) {
|
|
@@ -3162,7 +3186,7 @@ class BpmnValidateService {
|
|
|
3162
3186
|
});
|
|
3163
3187
|
}
|
|
3164
3188
|
const allowedOwners = getAllowedOwnerTypes(contract);
|
|
3165
|
-
if (!allowedOwners.some((allowedOwner) =>
|
|
3189
|
+
if (!allowedOwners.some((allowedOwner) => getLocalName(allowedOwner) === getLocalName(owner.name) && resolveNamespace(owner) === BPMN_MODEL_NAMESPACE)) {
|
|
3166
3190
|
diagnostics.push({
|
|
3167
3191
|
file,
|
|
3168
3192
|
element: describeElement(owner),
|
|
@@ -3631,10 +3655,23 @@ function findFirst(node, predicate) {
|
|
|
3631
3655
|
return;
|
|
3632
3656
|
}
|
|
3633
3657
|
function hasLocalName(node, localName) {
|
|
3634
|
-
return
|
|
3658
|
+
return getLocalName(node.name) === localName.toLowerCase();
|
|
3659
|
+
}
|
|
3660
|
+
function getLocalName(name) {
|
|
3661
|
+
return name.slice(name.lastIndexOf(":") + 1).toLowerCase();
|
|
3635
3662
|
}
|
|
3636
|
-
function
|
|
3637
|
-
|
|
3663
|
+
function resolveNamespace(node) {
|
|
3664
|
+
const separator = node.name.indexOf(":");
|
|
3665
|
+
const prefix = separator === -1 ? "" : node.name.slice(0, separator);
|
|
3666
|
+
const declaration = prefix ? `xmlns:${prefix}` : "xmlns";
|
|
3667
|
+
let current = node;
|
|
3668
|
+
while (current) {
|
|
3669
|
+
if (Object.hasOwn(current.attributes, declaration)) {
|
|
3670
|
+
return current.attributes[declaration];
|
|
3671
|
+
}
|
|
3672
|
+
current = current.parent;
|
|
3673
|
+
}
|
|
3674
|
+
return;
|
|
3638
3675
|
}
|
|
3639
3676
|
function findBpmnOwner(payload) {
|
|
3640
3677
|
const extensionElements = payload.parent;
|
|
@@ -3663,7 +3700,8 @@ function getAllowedOwnerTypes(contract) {
|
|
|
3663
3700
|
"bpmn:StartEvent",
|
|
3664
3701
|
"bpmn:EndEvent",
|
|
3665
3702
|
"bpmn:Task",
|
|
3666
|
-
"bpmn:ScriptTask"
|
|
3703
|
+
"bpmn:ScriptTask",
|
|
3704
|
+
"bpmn:SubProcess"
|
|
3667
3705
|
];
|
|
3668
3706
|
}
|
|
3669
3707
|
const placementTypes = Object.values(contract.placements).map((placement) => placement.type);
|
|
@@ -3995,4 +4033,4 @@ export {
|
|
|
3995
4033
|
BpmnToolFactory
|
|
3996
4034
|
};
|
|
3997
4035
|
|
|
3998
|
-
//# debugId=
|
|
4036
|
+
//# debugId=5BF054B517D10FFA64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/packager-tool-bpmn",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.200.0-preview.109",
|
|
4
4
|
"description": "UiPath ProcessOrchestration (BPMN) tool implementation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"author": "",
|
|
26
26
|
"license": "ISC",
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@uipath/solutionpackager-tool-core": "1.
|
|
28
|
+
"@uipath/solutionpackager-tool-core": "1.200.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@uipath/maestro-sdk": "1.
|
|
31
|
+
"@uipath/maestro-sdk": "1.200.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "fcc01cdae81bbd0c25d3d4fc287537a9d19d99f4"
|
|
34
34
|
}
|