@uipath/maestro-sdk 1.1.0 → 1.196.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.
@@ -2969,10 +2969,14 @@ var STATIC_UIPATH_EXTENSION_TAG_NAMES = [
2969
2969
  "caseManagement",
2970
2970
  "context",
2971
2971
  "entryPointId",
2972
+ "error",
2973
+ "errorDefinition",
2974
+ "errorMapping",
2972
2975
  "input",
2973
2976
  "inputOutput",
2974
2977
  "inputSchema",
2975
2978
  "intsvcActivityConfig",
2979
+ "isTransactionRoot",
2976
2980
  "loopCharacteristics",
2977
2981
  "migrationVersion",
2978
2982
  "output",
@@ -3141,7 +3145,16 @@ class BpmnValidateService {
3141
3145
  });
3142
3146
  return;
3143
3147
  }
3144
- if (!payload.attributes.type && typeNodes.length !== 1) {
3148
+ if (!payload.attributes.type && typeNodes.length === 0 && !isImplicitVariablesMapping(payload, owner)) {
3149
+ diagnostics.push({
3150
+ file,
3151
+ element: describeElement(owner),
3152
+ message: `${payload.name} must contain exactly one uipath:type child or a type attribute.`,
3153
+ instruction: "Add one uipath:type element with a supported value attribute, or set the payload type attribute."
3154
+ });
3155
+ return;
3156
+ }
3157
+ if (!payload.attributes.type && typeNodes.length > 1) {
3145
3158
  diagnostics.push({
3146
3159
  file,
3147
3160
  element: describeElement(owner),
@@ -3151,7 +3164,7 @@ class BpmnValidateService {
3151
3164
  return;
3152
3165
  }
3153
3166
  const typeNode = typeNodes[0];
3154
- const extensionType = payload.attributes.type ?? typeNode?.attributes.value;
3167
+ const extensionType = payload.attributes.type ?? typeNode?.attributes.value ?? inferImplicitExtensionType(payload, owner);
3155
3168
  if (!extensionType) {
3156
3169
  diagnostics.push({
3157
3170
  file,
@@ -3687,9 +3700,23 @@ function usesCanvasOwnedDynamicPayload(contract) {
3687
3700
  return contract.isDynamic === true || contract.extensionType.startsWith("Intsvc.") && contract.requiresDiscovery;
3688
3701
  }
3689
3702
  function getAllowedOwnerTypes(contract) {
3703
+ if (contract.extensionType === "BPMN.Variables") {
3704
+ return [
3705
+ "bpmn:StartEvent",
3706
+ "bpmn:EndEvent",
3707
+ "bpmn:Task",
3708
+ "bpmn:ScriptTask"
3709
+ ];
3710
+ }
3690
3711
  const placementTypes = Object.values(contract.placements).map((placement) => placement.type);
3691
3712
  return placementTypes.length > 0 ? placementTypes : [contract.bpmnElement];
3692
3713
  }
3714
+ function inferImplicitExtensionType(payload, owner) {
3715
+ return isImplicitVariablesMapping(payload, owner) ? "BPMN.Variables" : undefined;
3716
+ }
3717
+ function isImplicitVariablesMapping(payload, owner) {
3718
+ return payload.name === "uipath:mapping" && !payload.attributes.type && childElements(payload, "uipath:type").length === 0 && hasLocalName(owner, "task");
3719
+ }
3693
3720
  function getExpectedInputName(contract) {
3694
3721
  if (contract.inputPattern === "splitInputsItemData") {
3695
3722
  return "ItemData";