@uipath/packager-tool-bpmn 1.199.0-preview.97 → 1.199.0

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -8
  2. package/package.json +2 -2
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:EndEvent for variable mappings. On bpmn:Task with no serviceType, defaults to BPMN.Variables.",
2216
- extensionTagNotes: "Uses uipath:mapping (not uipath:activity). createExtensionTask checks for serviceType=BPMN.Variables on StartEvent/EndEvent/Task and routes to createModdleExtensionVariableMapping."
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",
@@ -2956,6 +2956,7 @@ var SUPPORTED_UIPATH_EXTENSION_TAG_NAMES = Object.freeze([
2956
2956
  var SUPPORTED_UIPATH_EXTENSION_TAGS = Object.freeze(SUPPORTED_UIPATH_EXTENSION_TAG_NAMES.map((tag) => `uipath:${tag}`));
2957
2957
  var KNOWN_UIPATH_TAGS = new Set(SUPPORTED_UIPATH_EXTENSION_TAGS);
2958
2958
  var SEMANTIC_VALIDATION_ERROR = "BPMN_VALIDATION_ERROR";
2959
+ var BPMN_MODEL_NAMESPACE = "http://www.omg.org/spec/BPMN/20100524/MODEL";
2959
2960
 
2960
2961
  class BpmnValidateService {
2961
2962
  fileSystem;
@@ -3162,7 +3163,7 @@ class BpmnValidateService {
3162
3163
  });
3163
3164
  }
3164
3165
  const allowedOwners = getAllowedOwnerTypes(contract);
3165
- if (!allowedOwners.some((allowedOwner) => normalizeBpmnName(allowedOwner) === normalizeBpmnName(owner.name))) {
3166
+ if (!allowedOwners.some((allowedOwner) => getLocalName(allowedOwner) === getLocalName(owner.name) && resolveNamespace(owner) === BPMN_MODEL_NAMESPACE)) {
3166
3167
  diagnostics.push({
3167
3168
  file,
3168
3169
  element: describeElement(owner),
@@ -3631,10 +3632,23 @@ function findFirst(node, predicate) {
3631
3632
  return;
3632
3633
  }
3633
3634
  function hasLocalName(node, localName) {
3634
- return normalizeBpmnName(node.name).split(":").pop() === localName.toLowerCase();
3635
+ return getLocalName(node.name) === localName.toLowerCase();
3635
3636
  }
3636
- function normalizeBpmnName(name) {
3637
- return name.toLowerCase();
3637
+ function getLocalName(name) {
3638
+ return name.slice(name.lastIndexOf(":") + 1).toLowerCase();
3639
+ }
3640
+ function resolveNamespace(node) {
3641
+ const separator = node.name.indexOf(":");
3642
+ const prefix = separator === -1 ? "" : node.name.slice(0, separator);
3643
+ const declaration = prefix ? `xmlns:${prefix}` : "xmlns";
3644
+ let current = node;
3645
+ while (current) {
3646
+ if (Object.hasOwn(current.attributes, declaration)) {
3647
+ return current.attributes[declaration];
3648
+ }
3649
+ current = current.parent;
3650
+ }
3651
+ return;
3638
3652
  }
3639
3653
  function findBpmnOwner(payload) {
3640
3654
  const extensionElements = payload.parent;
@@ -3663,7 +3677,8 @@ function getAllowedOwnerTypes(contract) {
3663
3677
  "bpmn:StartEvent",
3664
3678
  "bpmn:EndEvent",
3665
3679
  "bpmn:Task",
3666
- "bpmn:ScriptTask"
3680
+ "bpmn:ScriptTask",
3681
+ "bpmn:SubProcess"
3667
3682
  ];
3668
3683
  }
3669
3684
  const placementTypes = Object.values(contract.placements).map((placement) => placement.type);
@@ -3995,4 +4010,4 @@ export {
3995
4010
  BpmnToolFactory
3996
4011
  };
3997
4012
 
3998
- //# debugId=44BFEEFD91BBE09264756E2164756E21
4013
+ //# debugId=DFBAED50B7EADE9664756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/packager-tool-bpmn",
3
- "version": "1.199.0-preview.97",
3
+ "version": "1.199.0",
4
4
  "description": "UiPath ProcessOrchestration (BPMN) tool implementation",
5
5
  "type": "module",
6
6
  "exports": {
@@ -30,5 +30,5 @@
30
30
  "dependencies": {
31
31
  "@uipath/maestro-sdk": "1.199.0"
32
32
  },
33
- "gitHead": "087ae21e842f27bde5eb0013892c9487bfe60568"
33
+ "gitHead": "723e6801b77b5926ba75e75b6a756cc38b1b7adc"
34
34
  }