@uipath/packager-tool-bpmn 1.207.0-preview.327 → 1.207.0-preview.328
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 +81 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -13104,7 +13104,7 @@ function connectorNodes(process, types = CONNECTION_CONNECTOR_TYPES) {
|
|
|
13104
13104
|
return [{ element, extensionType, values }];
|
|
13105
13105
|
});
|
|
13106
13106
|
}
|
|
13107
|
-
var CONNECTION_CONNECTOR_TYPES, EXTERNAL_EXECUTION_TYPES, BINDING_NODE_TYPES, connectionReference = (values) => [values.get("connection"), values.get("connectionId")].find((value) => value?.trim()), bindingIdOf = (value) => /^=bindings\.([A-Za-z_][\w.-]*)$/.exec(value ?? "")?.[1], rootBindingNodes = (process) => childNodes(extensionValues(process).find((node) => node.$type === "uipath:bindings")).filter((node) => node.$type === "uipath:binding"), connectionBindingNodes = (process) => rootBindingNodes(process).filter((node) => node.resource === "Connection" && node.propertyAttribute === "ConnectionId");
|
|
13107
|
+
var CONNECTION_CONNECTOR_TYPES, EXTERNAL_EXECUTION_TYPES, BINDING_NODE_TYPES, connectionReference = (values) => [values.get("connection"), values.get("connectionId")].find((value) => value?.trim()), bindingIdOf = (value) => /^=bindings\.([A-Za-z_][\w.-]*)$/.exec(value ?? "")?.[1], rootBindingNodes = (process) => childNodes(extensionValues(process).find((node) => node.$type === "uipath:bindings")).filter((node) => node.$type === "uipath:binding"), collaborationBindingNodes = (process) => (process.$parent?.rootElements ?? []).filter((element) => element.$type === "bpmn:Collaboration").flatMap(rootBindingNodes), connectionBindingNodes = (process) => rootBindingNodes(process).filter((node) => node.resource === "Connection" && node.propertyAttribute === "ConnectionId");
|
|
13108
13108
|
var init_node_utils = __esm(() => {
|
|
13109
13109
|
CONNECTION_CONNECTOR_TYPES = new Set([
|
|
13110
13110
|
"Intsvc.ActivityExecution",
|
|
@@ -13125,6 +13125,77 @@ var init_node_utils = __esm(() => {
|
|
|
13125
13125
|
]);
|
|
13126
13126
|
});
|
|
13127
13127
|
|
|
13128
|
+
// ../../maestro-sdk/src/bpmn-packaging/business-rule-resources.ts
|
|
13129
|
+
function buildBusinessRuleResources(processes) {
|
|
13130
|
+
const rows = new Map;
|
|
13131
|
+
for (const process of processes) {
|
|
13132
|
+
const bindings = [
|
|
13133
|
+
...rootBindingNodes(process),
|
|
13134
|
+
...collaborationBindingNodes(process)
|
|
13135
|
+
];
|
|
13136
|
+
const ruleBindings = bindings.filter((binding) => binding.resource === BUSINESS_RULE_RESOURCE && binding.id && binding.resourceKey && !FOLDER_ATTRIBUTES.has(binding.propertyAttribute ?? ""));
|
|
13137
|
+
if (ruleBindings.length === 0)
|
|
13138
|
+
continue;
|
|
13139
|
+
const tasks = connectorNodes(process, BUSINESS_RULE_TASK_TYPES);
|
|
13140
|
+
for (const binding of ruleBindings) {
|
|
13141
|
+
const key = binding.resourceKey;
|
|
13142
|
+
if (rows.has(key))
|
|
13143
|
+
continue;
|
|
13144
|
+
const task = tasks.find((candidate) => [...candidate.values.values()].some((value) => bindingIdOf(value) === binding.id));
|
|
13145
|
+
if (task === undefined)
|
|
13146
|
+
continue;
|
|
13147
|
+
rows.set(key, businessRuleRow(binding, task.element, resolve(task.values.get("name"), bindings), resolve(task.values.get("folderPath"), bindings)));
|
|
13148
|
+
}
|
|
13149
|
+
}
|
|
13150
|
+
return [...rows.values()];
|
|
13151
|
+
}
|
|
13152
|
+
function resolve(value, bindings) {
|
|
13153
|
+
const id = bindingIdOf(value);
|
|
13154
|
+
const resolved = id === undefined ? value : bindings.find((binding) => binding.id === id)?.default;
|
|
13155
|
+
return resolved?.startsWith("=") ? undefined : resolved;
|
|
13156
|
+
}
|
|
13157
|
+
function businessRuleRow(binding, task, name, folderPath) {
|
|
13158
|
+
const key = binding.resourceKey;
|
|
13159
|
+
const value = {};
|
|
13160
|
+
if (folderPath) {
|
|
13161
|
+
value.folderPath = {
|
|
13162
|
+
defaultValue: folderPath,
|
|
13163
|
+
isExpression: false,
|
|
13164
|
+
displayName: "Folder path"
|
|
13165
|
+
};
|
|
13166
|
+
}
|
|
13167
|
+
if (name) {
|
|
13168
|
+
value.name = {
|
|
13169
|
+
defaultValue: name,
|
|
13170
|
+
isExpression: false,
|
|
13171
|
+
displayName: "Business rule"
|
|
13172
|
+
};
|
|
13173
|
+
}
|
|
13174
|
+
return {
|
|
13175
|
+
resource: BUSINESS_RULE_RESOURCE,
|
|
13176
|
+
key,
|
|
13177
|
+
id: `${BUSINESS_RULE_RESOURCE}${key}`,
|
|
13178
|
+
value,
|
|
13179
|
+
metadata: {
|
|
13180
|
+
ActivityName: task.name?.trim() || task.id || "",
|
|
13181
|
+
BindingsVersion: BINDINGS_VERSION,
|
|
13182
|
+
DisplayLabel: binding.name ?? ""
|
|
13183
|
+
}
|
|
13184
|
+
};
|
|
13185
|
+
}
|
|
13186
|
+
var BUSINESS_RULE_RESOURCE = "BusinessRule", BUSINESS_RULE_TASK_TYPES, FOLDER_ATTRIBUTES;
|
|
13187
|
+
var init_business_rule_resources = __esm(() => {
|
|
13188
|
+
init_bindings();
|
|
13189
|
+
init_node_utils();
|
|
13190
|
+
BUSINESS_RULE_TASK_TYPES = new Set([
|
|
13191
|
+
"Orchestrator.BusinessRules"
|
|
13192
|
+
]);
|
|
13193
|
+
FOLDER_ATTRIBUTES = new Set([
|
|
13194
|
+
"folderKey",
|
|
13195
|
+
"folderPath"
|
|
13196
|
+
]);
|
|
13197
|
+
});
|
|
13198
|
+
|
|
13128
13199
|
// ../../maestro-sdk/src/bpmn-packaging/connection-resources.ts
|
|
13129
13200
|
function targetConnectorOf(body) {
|
|
13130
13201
|
if (!body?.trim())
|
|
@@ -13427,14 +13498,17 @@ function buildBindingResources(processes, existingResources) {
|
|
|
13427
13498
|
}
|
|
13428
13499
|
}
|
|
13429
13500
|
}
|
|
13430
|
-
for (const resource of
|
|
13501
|
+
for (const resource of [
|
|
13502
|
+
...buildEntityResources(processes),
|
|
13503
|
+
...buildBusinessRuleResources(processes)
|
|
13504
|
+
]) {
|
|
13431
13505
|
const id = resourceIdentity(resource);
|
|
13432
13506
|
if (!generated.has(id))
|
|
13433
13507
|
generated.set(id, resource);
|
|
13434
13508
|
}
|
|
13435
13509
|
const declared = declaredResourceKeys(processes);
|
|
13436
13510
|
const sdkEntities = sdkEntityKeys(processes);
|
|
13437
|
-
const merged = withConnections.filter((resource) => !isRebuiltRow(resource) || generated.has(resourceIdentity(resource)) || isScopedRow(resource) && declared.has(String(resource.key)) && !(resource.resource === "Entity" && sdkEntities.has(String(resource.key)))).map((resource) => {
|
|
13511
|
+
const merged = withConnections.filter((resource) => !isRebuiltRow(resource) || generated.has(resourceIdentity(resource)) || isScopedRow(resource) && declared.has(String(resource.key)) && resource.resource !== BUSINESS_RULE_RESOURCE && !(resource.resource === "Entity" && sdkEntities.has(String(resource.key)))).map((resource) => {
|
|
13438
13512
|
const id = resourceIdentity(resource);
|
|
13439
13513
|
const replacement = generated.get(id);
|
|
13440
13514
|
if (replacement === undefined)
|
|
@@ -13445,8 +13519,9 @@ function buildBindingResources(processes, existingResources) {
|
|
|
13445
13519
|
return [...merged, ...generated.values()];
|
|
13446
13520
|
}
|
|
13447
13521
|
function isRebuiltRow(resource) {
|
|
13448
|
-
if (resource.resource === "EventTrigger")
|
|
13522
|
+
if (resource.resource === "EventTrigger" || resource.resource === BUSINESS_RULE_RESOURCE) {
|
|
13449
13523
|
return true;
|
|
13524
|
+
}
|
|
13450
13525
|
const metadata = isJsonObject(resource.metadata) ? resource.metadata : undefined;
|
|
13451
13526
|
if (typeof metadata?.NameFieldPath === "string")
|
|
13452
13527
|
return true;
|
|
@@ -13559,6 +13634,7 @@ function parseObject(raw) {
|
|
|
13559
13634
|
var resourceIdentity = (resource) => `${String(resource.resource)}|${String(resource.key)}`, isScopedRow = (resource) => isJsonObject(resource.metadata) && typeof resource.metadata.Scope === "string", stringOrUndefined = (value) => typeof value === "string" ? value : undefined;
|
|
13560
13635
|
var init_binding_resources = __esm(() => {
|
|
13561
13636
|
init_bindings();
|
|
13637
|
+
init_business_rule_resources();
|
|
13562
13638
|
init_connection_resources();
|
|
13563
13639
|
init_entity_resources();
|
|
13564
13640
|
init_node_utils();
|
|
@@ -20062,4 +20138,4 @@ export {
|
|
|
20062
20138
|
BpmnToolFactory
|
|
20063
20139
|
};
|
|
20064
20140
|
|
|
20065
|
-
//# debugId=
|
|
20141
|
+
//# debugId=E051A4F04735E44064756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/packager-tool-bpmn",
|
|
3
|
-
"version": "1.207.0-preview.
|
|
3
|
+
"version": "1.207.0-preview.328",
|
|
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": "
|
|
29
|
+
"gitHead": "c647aa45035d66e167006b621a5115ed05d95d65"
|
|
30
30
|
}
|