@uipath/packager-tool-bpmn 1.207.0-preview.320 → 1.207.0-preview.322

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 +18 -9
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -6532,7 +6532,7 @@ var init_bpmn_spec = __esm(() => {
6532
6532
  <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
6533
6533
  </bpmn:sendTask>`,
6534
6534
  discoveryNotes: "Use `uip is activities list <connector-key> --output json` to select an activity. Set operation from Name, then describe ObjectName to get its current path, parameters, and fields.",
6535
- inputNotes: "Add each request field from the selected operation as its own uipath:input. Keep the field's type and target: path, query, body, or file.",
6535
+ inputNotes: 'Add each non-body field from the selected operation (path, query, header, or file) as its own uipath:input, keeping its type and target. Put every body field in ONE <uipath:input name="body" type="json" target="body"> holding the whole request object: the runtime keeps a single body value, so separate body inputs overwrite each other and only the last one is sent.',
6536
6536
  contextFieldNotes: "connection points to a root binding for a Connection resource. When folder scoping is required, folderKey points to a second binding for the same resourceKey. Use propertyAttribute ConnectionId for connection and folderKey for folderKey. Omit folderKey when the selected activity has no folder scoping, and omit both fields only when it does not use a connection.",
6537
6537
  extensionTagNotes: "In isExecution array, NOT in isEvents array, so uses uipath:activity"
6538
6538
  },
@@ -9358,18 +9358,22 @@ var init_bpmn_spec = __esm(() => {
9358
9358
  bindingPattern: "none",
9359
9359
  requiresDiscovery: false,
9360
9360
  isDynamic: false,
9361
- xmlTemplate: `<bpmn:scriptTask id="{id}" name="{name}">
9361
+ xmlTemplate: `<bpmn:scriptTask id="{id}" name="{name}" scriptFormat="JavaScript">
9362
9362
  <bpmn:extensionElements>
9363
9363
  <uipath:mapping version="v1">
9364
- <uipath:type value="BPMN.ScriptTask" version="v1" />
9365
- <uipath:input name="args" type="json" target="bodyField"><![CDATA[{}]]></uipath:input>
9364
+ <uipath:type value="BPMN.Variables" version="v1" />
9365
+ <uipath:context>
9366
+ <uipath:inputSchema type="jsonSchema">{"type":"object","properties":{"vars":{"type":"object"},"metadata":{"type":"object"}}}</uipath:inputSchema>
9367
+ </uipath:context>
9368
+ <uipath:input name="args" type="json" target="bodyField"><![CDATA[{"vars":"=vars","metadata":"=metadata"}]]></uipath:input>
9366
9369
  </uipath:mapping>
9370
+ <uipath:scriptVersion value="v3" />
9367
9371
  </bpmn:extensionElements>
9368
9372
  <bpmn:incoming>{incomingEdge}</bpmn:incoming>
9369
9373
  <bpmn:outgoing>{outgoingEdge}</bpmn:outgoing>
9370
9374
  </bpmn:scriptTask>`,
9371
- inputNotes: "Inputs are merged into a single json input named 'args' with target 'bodyField'. An inputSchema is created from the input variables.",
9372
- extensionTagNotes: "bpmn:ScriptTask is routed through createModdleExtensionVariableMapping (same as BPMN.Variables). Inputs are merged into a single 'args' JSON body with inputSchema."
9375
+ inputNotes: `Inputs are merged into a single json input named 'args' with target 'bodyField'. Keep the vars and metadata keys. Inside a loop, add one key per in-scope loop, named after its uipath:loopCharacteristics inputElement and valued =<inputElement> ("iterator[0]":"=iterator[0]"), or the script faults with "iterator is not defined". The script reads vars.<id> and iterator[0].item. Put the JavaScript in a bpmn:script element as the last child of the scriptTask. With scriptVersion v3 the runtime wraps the return value. Map it inside the mapping with <uipath:output name="scriptResponse" type="jsonSchema" source="=result.response" var="<varId>" /> plus <uipath:output name="Error" type="jsonSchema" source="=Error" />; Studio Web replaces the outputs of a script task that lacks either when the task is opened. On a multi-instance script task use name="response" source="=response". Read one field of a returned object as =result.response.<field>. Return the value itself; return { response: x } reads back as =result.response.response. Keep <uipath:migrationVersion version="21" /> on the process, as bpmn init writes it, or Studio Web resets the task to v2.`,
9376
+ extensionTagNotes: "The mapping type is BPMN.Variables. BPMN.ScriptTask names this entry only: as a uipath:type value the runtime skips the script, every output reads back null, and the task still completes."
9373
9377
  },
9374
9378
  "ConversationalService.QueueServiceMessage": {
9375
9379
  extensionType: "ConversationalService.QueueServiceMessage",
@@ -11586,7 +11590,8 @@ class BpmnValidateService {
11586
11590
  if (contract.extensionType === "Intsvc.EventTrigger" || contract.extensionType === "Intsvc.WaitForEvent") {
11587
11591
  this.validateTriggerConnectionBinding(file, payload, owner, bindings, contract.extensionType, diagnostics);
11588
11592
  }
11589
- this.validateInputs(file, payload, owner, contract, diagnostics);
11593
+ const inputContract = contract.extensionType === "BPMN.Variables" && hasLocalName(owner, "scriptTask") ? SCRIPT_TASK_INPUT_CONTRACT : contract;
11594
+ this.validateInputs(file, payload, owner, inputContract, diagnostics);
11590
11595
  this.validateOutput(file, payload, owner, contract, diagnostics);
11591
11596
  this.validateBindingReferences(file, payload, bindings, diagnostics);
11592
11597
  }
@@ -12986,7 +12991,7 @@ function isWarningDiagnostic(diagnostic) {
12986
12991
  function decodeXmlEntities(value) {
12987
12992
  return value.replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
12988
12993
  }
12989
- var SCRIPT_RUNTIME_GLOBALS, KNOWN_UIPATH_TAGS, CALL_ACTIVITY_TYPES, CALL_ACTIVITY_PAYLOAD_TAGS, SEMANTIC_VALIDATION_ERROR = "BPMN_VALIDATION_ERROR", BPMN_MODEL_NAMESPACE = "http://www.omg.org/spec/BPMN/20100524/MODEL", ACTIVITY_CONFIGURATION_V1 = "v1", ACTIVITY_CONFIGURATION_V2 = "v2", VERSIONED_CONNECTOR_TYPES, BOUND_RESOURCE_VERSION = "v2", HITL_TYPE_INPUT = "hitlType", HITL_TYPE_QUICK = "quick", HITL_TYPE_CUSTOM = "custom", HITL_QUICK_SCHEMA_INPUTS, NUMERIC_ID, BOUND_RESOURCE_RULES, CDATA_OPEN = "<![CDATA[", TAG_OPEN = "<", TAG_CLOSE = ">", DELIMITED_TOKENS, ATTRIBUTE_QUOTES, WHITESPACE, VARIABLE_READ, DIRECT_VARIABLE_READ, FREE_TEXT_ELEMENTS, VARIABLE_DECLARATION_NAMES, COLLAPSED_MULTI_INSTANCE_OUTPUT_CONTRACTS;
12994
+ var SCRIPT_RUNTIME_GLOBALS, KNOWN_UIPATH_TAGS, SCRIPT_TASK_INPUT_CONTRACT, CALL_ACTIVITY_TYPES, CALL_ACTIVITY_PAYLOAD_TAGS, SEMANTIC_VALIDATION_ERROR = "BPMN_VALIDATION_ERROR", BPMN_MODEL_NAMESPACE = "http://www.omg.org/spec/BPMN/20100524/MODEL", ACTIVITY_CONFIGURATION_V1 = "v1", ACTIVITY_CONFIGURATION_V2 = "v2", VERSIONED_CONNECTOR_TYPES, BOUND_RESOURCE_VERSION = "v2", HITL_TYPE_INPUT = "hitlType", HITL_TYPE_QUICK = "quick", HITL_TYPE_CUSTOM = "custom", HITL_QUICK_SCHEMA_INPUTS, NUMERIC_ID, BOUND_RESOURCE_RULES, CDATA_OPEN = "<![CDATA[", TAG_OPEN = "<", TAG_CLOSE = ">", DELIMITED_TOKENS, ATTRIBUTE_QUOTES, WHITESPACE, VARIABLE_READ, DIRECT_VARIABLE_READ, FREE_TEXT_ELEMENTS, VARIABLE_DECLARATION_NAMES, COLLAPSED_MULTI_INSTANCE_OUTPUT_CONTRACTS;
12990
12995
  var init_project_validator = __esm(() => {
12991
12996
  init_catch_error();
12992
12997
  init_guid();
@@ -13005,6 +13010,10 @@ var init_project_validator = __esm(() => {
13005
13010
  ...JINT_GLOBALS
13006
13011
  ]);
13007
13012
  KNOWN_UIPATH_TAGS = new Set(SUPPORTED_UIPATH_EXTENSION_TAGS);
13013
+ SCRIPT_TASK_INPUT_CONTRACT = {
13014
+ ...BPMN_SPEC.extensionTypes["BPMN.ScriptTask"],
13015
+ extensionType: "BPMN.Variables script task"
13016
+ };
13008
13017
  CALL_ACTIVITY_TYPES = Object.entries(BPMN_SPEC.extensionTypes).filter(([, contract]) => contract.bpmnElement === "bpmn:CallActivity").map(([type]) => type).sort((a, b) => a.localeCompare(b));
13009
13018
  CALL_ACTIVITY_PAYLOAD_TAGS = new Set(Object.values(BPMN_SPEC.extensionTypes).filter((contract) => contract.bpmnElement === "bpmn:CallActivity").map((contract) => contract.extensionTag).filter((tag) => typeof tag === "string"));
13010
13019
  VERSIONED_CONNECTOR_TYPES = new Set([
@@ -20053,4 +20062,4 @@ export {
20053
20062
  BpmnToolFactory
20054
20063
  };
20055
20064
 
20056
- //# debugId=DA0CA04E590FBE2164756E2164756E21
20065
+ //# debugId=9B573C4CA13841E664756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/packager-tool-bpmn",
3
- "version": "1.207.0-preview.320",
3
+ "version": "1.207.0-preview.322",
4
4
  "description": "UiPath ProcessOrchestration (BPMN) tool implementation",
5
5
  "type": "module",
6
6
  "exports": {
@@ -26,5 +26,5 @@
26
26
  "dependencies": {
27
27
  "@uipath/maestro-sdk": "1.207.0"
28
28
  },
29
- "gitHead": "88d2f69554199d46ecead81b38da206f6c3f4b71"
29
+ "gitHead": "5f0dd7c11b7eca166a51567870d72aeace65628c"
30
30
  }