From 1503d08a69de58d6d8d64edd36a6c1a149ad05e6 Mon Sep 17 00:00:00 2001
From: Hoan Nguyen <83745591+nqhoan-axonivy@users.noreply.github.com>
Date: Mon, 29 Jul 2024 16:32:48 +0700
Subject: [PATCH] Feature/MARP-607 UI path authentication does not work
properly for 11.3.0 (#31)
* MARP-607 Fix Engine test build failed
* Introduce for 11.3
---
pom.xml | 2 +-
ui-path-connector-demo/.classpath | 7 +-
ui-path-connector-demo/.project | 5 +
.../.settings/ch.ivyteam.ivy.designer.prefs | 4 +-
.../org.eclipse.wst.common.component | 21 +-
ui-path-connector-demo/pom.xml | 5 +-
.../processes/uiPathDemo.p.json | 64 +++--
ui-path-connector-test/.classpath | 7 +-
ui-path-connector-test/.project | 5 +
.../.settings/ch.ivyteam.ivy.designer.prefs | 4 +-
.../org.eclipse.wst.common.component | 21 +-
ui-path-connector-test/pom.xml | 5 +-
ui-path-connector/.classpath | 7 +-
ui-path-connector/.project | 5 +
.../.settings/ch.ivyteam.ivy.designer.prefs | 4 +-
.../org.eclipse.wst.common.component | 21 +-
ui-path-connector/pom.xml | 5 +-
ui-path-connector/processes/uiPathJob.p.json | 263 ++++++++++--------
ui-path-connector/processes/uiPathRpa.p.json | 244 +++++++++-------
19 files changed, 396 insertions(+), 303 deletions(-)
diff --git a/pom.xml b/pom.xml
index 832d212..ffb8c02 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,7 +42,7 @@
com.axonivy.ivy.ci
project-build-plugin
- 10.0.16
+ 11.3.0
true
diff --git a/ui-path-connector-demo/.classpath b/ui-path-connector-demo/.classpath
index c5aaa7c..9baacfb 100644
--- a/ui-path-connector-demo/.classpath
+++ b/ui-path-connector-demo/.classpath
@@ -5,12 +5,7 @@
-
-
-
-
-
-
+
diff --git a/ui-path-connector-demo/.project b/ui-path-connector-demo/.project
index 197aff3..a930426 100644
--- a/ui-path-connector-demo/.project
+++ b/ui-path-connector-demo/.project
@@ -30,6 +30,11 @@
+
+ ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder
+
+
+
ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder
diff --git a/ui-path-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs b/ui-path-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs
index 3e17759..b377627 100644
--- a/ui-path-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs
+++ b/ui-path-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs
@@ -1,5 +1,5 @@
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.axonivy.connector.uipath.ui.path.connector.demo.Data
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.connector.uipath.ui.path.connector.demo
-ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
-ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000
+ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13
+ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=113000
eclipse.preferences.version=1
diff --git a/ui-path-connector-demo/.settings/org.eclipse.wst.common.component b/ui-path-connector-demo/.settings/org.eclipse.wst.common.component
index 364d7d5..3b507c8 100644
--- a/ui-path-connector-demo/.settings/org.eclipse.wst.common.component
+++ b/ui-path-connector-demo/.settings/org.eclipse.wst.common.component
@@ -1,11 +1,10 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ui-path-connector-demo/pom.xml b/ui-path-connector-demo/pom.xml
index 098894d..f61e6f9 100644
--- a/ui-path-connector-demo/pom.xml
+++ b/ui-path-connector-demo/pom.xml
@@ -1,5 +1,6 @@
-
+
4.0.0
com.axonivy.connector.uipath
ui-path-connector-demo
@@ -18,7 +19,7 @@
com.axonivy.ivy.ci
project-build-plugin
- 10.0.16
+ 11.3.0
true
diff --git a/ui-path-connector-demo/processes/uiPathDemo.p.json b/ui-path-connector-demo/processes/uiPathDemo.p.json
index d6c0f6e..fc3161a 100644
--- a/ui-path-connector-demo/processes/uiPathDemo.p.json
+++ b/ui-path-connector-demo/processes/uiPathDemo.p.json
@@ -1,5 +1,5 @@
{
- "format" : "10.0.0",
+ "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json",
"id" : "17603AC61307C899",
"config" : {
"data" : "com.axonivy.connector.uipath.ui.path.connector.demo.UiPathDemoData"
@@ -18,16 +18,21 @@
"GetOrders.ivp"
],
"config" : {
- "callSignature" : "robotGetOrders",
- "outLink" : "robotGetOrders.ivp",
- "startName" : "DEMO: RPA integration with UIPath",
- "tags" : "demo"
+ "signature" : "robotGetOrders",
+ "request" : {
+ "name" : "DEMO: RPA integration with UIPath"
+ }
},
+ "tags" : [
+ "demo"
+ ],
"visual" : {
"at" : { "x" : 96, "y" : 64 },
"labelOffset" : { "x" : 17, "y" : 41 }
},
- "connect" : { "id" : "f2", "to" : "f0" }
+ "connect" : [
+ { "id" : "f2", "to" : "f0" }
+ ]
}, {
"id" : "f0",
"type" : "SubProcessCall",
@@ -35,9 +40,6 @@
"config" : {
"processCall" : "uiPathRpa:startJob(String)",
"call" : {
- "params" : [
- { "name" : "job", "type" : "String" }
- ],
"map" : {
"param.job" : "\"getOrders\""
}
@@ -47,7 +49,9 @@
"at" : { "x" : 224, "y" : 64 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f3", "to" : "f1" }
+ "connect" : [
+ { "id" : "f3", "to" : "f1" }
+ ]
}, {
"id" : "f4",
"type" : "ErrorStartEvent",
@@ -63,7 +67,7 @@
},
"visual" : {
"at" : { "x" : 512, "y" : 64 },
- "labelOffset" : { "x" : 11, "y" : 35 }
+ "labelOffset" : { "x" : 11 }
}
}, {
"id" : "f12",
@@ -81,20 +85,25 @@
"at" : { "x" : 744, "y" : 64 },
"size" : { "width" : 336, "height" : 80 }
},
- "connect" : { "id" : "f5", "to" : "f4" }
+ "connect" : [
+ { "id" : "f5", "to" : "f4" }
+ ]
}, {
"id" : "f6",
"type" : "RequestStart",
"name" : "triggerAllActiveJobs.ivp",
"config" : {
- "callSignature" : "triggerAllActiveJobs",
- "outLink" : "triggerAllActiveJobs.ivp",
- "startName" : "Trigger to start all active Jobs in Orcherstator"
+ "signature" : "triggerAllActiveJobs",
+ "request" : {
+ "name" : "Trigger to start all active Jobs in Orcherstator"
+ }
},
"visual" : {
"at" : { "x" : 96, "y" : 192 }
},
- "connect" : { "id" : "f11", "to" : "f10" }
+ "connect" : [
+ { "id" : "f11", "to" : "f10" }
+ ]
}, {
"id" : "f7",
"type" : "TaskEnd",
@@ -112,20 +121,25 @@
"at" : { "x" : 224, "y" : 192 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f8", "to" : "f7" }
+ "connect" : [
+ { "id" : "f8", "to" : "f7" }
+ ]
}, {
"id" : "f13",
"type" : "RequestStart",
"name" : "startJobByName.ivp",
"config" : {
- "callSignature" : "startJobByName",
- "outLink" : "startJobByName.ivp",
- "startName" : "Trigger to start job by name in Orcherstator"
+ "signature" : "startJobByName",
+ "request" : {
+ "name" : "Trigger to start job by name in Orcherstator"
+ }
},
"visual" : {
"at" : { "x" : 96, "y" : 320 }
},
- "connect" : { "id" : "f16", "to" : "f15" }
+ "connect" : [
+ { "id" : "f16", "to" : "f15" }
+ ]
}, {
"id" : "f14",
"type" : "TaskEnd",
@@ -142,10 +156,6 @@
"config" : {
"processCall" : "uiPathJob:startJobByName(String,String)",
"call" : {
- "params" : [
- { "name" : "jobName", "type" : "String" },
- { "name" : "jobArguments", "type" : "String" }
- ],
"map" : {
"param.jobName" : "\"SendEmailFromGmail\""
}
@@ -155,6 +165,8 @@
"at" : { "x" : 224, "y" : 320 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f17", "to" : "f14" }
+ "connect" : [
+ { "id" : "f17", "to" : "f14" }
+ ]
} ]
}
\ No newline at end of file
diff --git a/ui-path-connector-test/.classpath b/ui-path-connector-test/.classpath
index 13874a8..d896a77 100644
--- a/ui-path-connector-test/.classpath
+++ b/ui-path-connector-test/.classpath
@@ -5,12 +5,7 @@
-
-
-
-
-
-
+
diff --git a/ui-path-connector-test/.project b/ui-path-connector-test/.project
index 4bbdc54..6c25cb2 100644
--- a/ui-path-connector-test/.project
+++ b/ui-path-connector-test/.project
@@ -25,6 +25,11 @@
+
+ ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder
+
+
+
ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder
diff --git a/ui-path-connector-test/.settings/ch.ivyteam.ivy.designer.prefs b/ui-path-connector-test/.settings/ch.ivyteam.ivy.designer.prefs
index 1a932f0..4e34218 100644
--- a/ui-path-connector-test/.settings/ch.ivyteam.ivy.designer.prefs
+++ b/ui-path-connector-test/.settings/ch.ivyteam.ivy.designer.prefs
@@ -1,5 +1,5 @@
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.axonivy.connector.uipath.test.Data
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.connector.uipath.test
-ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
-ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000
+ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13
+ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=113000
eclipse.preferences.version=1
diff --git a/ui-path-connector-test/.settings/org.eclipse.wst.common.component b/ui-path-connector-test/.settings/org.eclipse.wst.common.component
index 061647b..c769eb2 100644
--- a/ui-path-connector-test/.settings/org.eclipse.wst.common.component
+++ b/ui-path-connector-test/.settings/org.eclipse.wst.common.component
@@ -1,11 +1,10 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ui-path-connector-test/pom.xml b/ui-path-connector-test/pom.xml
index 86e2ede..b5a3cb1 100644
--- a/ui-path-connector-test/pom.xml
+++ b/ui-path-connector-test/pom.xml
@@ -1,5 +1,6 @@
-
+
4.0.0
com.axonivy.connector.uipath
ui-path-connector-test
@@ -36,7 +37,7 @@
com.axonivy.ivy.ci
project-build-plugin
- 10.0.16
+ 11.3.0
true
diff --git a/ui-path-connector/.classpath b/ui-path-connector/.classpath
index e677439..d2a2e61 100644
--- a/ui-path-connector/.classpath
+++ b/ui-path-connector/.classpath
@@ -5,12 +5,7 @@
-
-
-
-
-
-
+
diff --git a/ui-path-connector/.project b/ui-path-connector/.project
index b2afb08..2ab1b3d 100644
--- a/ui-path-connector/.project
+++ b/ui-path-connector/.project
@@ -30,6 +30,11 @@
+
+ ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder
+
+
+
ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder
diff --git a/ui-path-connector/.settings/ch.ivyteam.ivy.designer.prefs b/ui-path-connector/.settings/ch.ivyteam.ivy.designer.prefs
index 8b64db3..ad4fc63 100644
--- a/ui-path-connector/.settings/ch.ivyteam.ivy.designer.prefs
+++ b/ui-path-connector/.settings/ch.ivyteam.ivy.designer.prefs
@@ -1,5 +1,5 @@
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=com.axonivy.connector.uipath.ui.path.connector.Data
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.connector.uipath.ui.path.connector
-ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
-ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000
+ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13
+ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=113000
eclipse.preferences.version=1
diff --git a/ui-path-connector/.settings/org.eclipse.wst.common.component b/ui-path-connector/.settings/org.eclipse.wst.common.component
index 8ed0700..527b8e5 100644
--- a/ui-path-connector/.settings/org.eclipse.wst.common.component
+++ b/ui-path-connector/.settings/org.eclipse.wst.common.component
@@ -1,11 +1,10 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ui-path-connector/pom.xml b/ui-path-connector/pom.xml
index 048e741..67c0a48 100644
--- a/ui-path-connector/pom.xml
+++ b/ui-path-connector/pom.xml
@@ -1,5 +1,6 @@
-
+
4.0.0
com.axonivy.connector.uipath
ui-path-connector
@@ -10,7 +11,7 @@
com.axonivy.ivy.ci
project-build-plugin
- 10.0.16
+ 11.3.0
true
diff --git a/ui-path-connector/processes/uiPathJob.p.json b/ui-path-connector/processes/uiPathJob.p.json
index 8355b4e..e855da9 100644
--- a/ui-path-connector/processes/uiPathJob.p.json
+++ b/ui-path-connector/processes/uiPathJob.p.json
@@ -1,5 +1,5 @@
{
- "format" : "10.0.0",
+ "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json",
"id" : "190E93ECBBC86C6F",
"kind" : "CALLABLE_SUB",
"config" : {
@@ -10,13 +10,15 @@
"type" : "CallSubStart",
"name" : "startAllActiveJobs()",
"config" : {
- "callSignature" : "startAllActiveJobs"
+ "signature" : "startAllActiveJobs"
},
"visual" : {
"at" : { "x" : 128, "y" : 64 },
"icon" : "res:/webContent/icons/uipath.png?small"
},
- "connect" : { "id" : "f21", "to" : "f12" }
+ "connect" : [
+ { "id" : "f21", "to" : "f12" }
+ ]
}, {
"id" : "f1",
"type" : "CallSubEnd",
@@ -35,19 +37,26 @@
"visual" : {
"at" : { "x" : 608, "y" : 176 }
},
- "connect" : { "id" : "f18", "to" : "f17", "via" : [ { "x" : 608, "y" : 112 } ] }
+ "connect" : [
+ { "id" : "f18", "to" : "f17", "via" : [ { "x" : 608, "y" : 112 } ] }
+ ]
}, {
"id" : "f17",
"type" : "Alternative",
"name" : "hasRelease?",
+ "config" : {
+ "conditions" : {
+ "f20" : "in.releases.isEmpty()"
+ }
+ },
"visual" : {
"at" : { "x" : 448, "y" : 64 },
- "labelOffset" : { "x" : 16, "y" : -24 }
+ "labelOffset" : { "y" : -24 }
},
"connect" : [
{ "id" : "f20", "to" : "f1", "label" : {
"name" : "no"
- }, "condition" : "in.releases.isEmpty()" },
+ } },
{ "id" : "f6", "to" : "f4", "label" : {
"name" : "yes"
} }
@@ -57,11 +66,11 @@
"type" : "CallSubStart",
"name" : "startJobByName(String,String)",
"config" : {
- "callSignature" : "startJobByName",
+ "signature" : "startJobByName",
"input" : {
"params" : [
- { "name" : "jobName", "type" : "String" },
- { "name" : "jobArguments", "type" : "String" }
+ { "name" : "jobName", "type" : "String", "desc" : "" },
+ { "name" : "jobArguments", "type" : "String", "desc" : "" }
],
"map" : {
"out.jobArguments" : "param.jobArguments",
@@ -73,7 +82,9 @@
"at" : { "x" : 128, "y" : 288 },
"icon" : "res:/webContent/icons/uipath.png?small"
},
- "connect" : { "id" : "f44", "to" : "f43" }
+ "connect" : [
+ { "id" : "f44", "to" : "f43" }
+ ]
}, {
"id" : "f11",
"type" : "CallSubEnd",
@@ -92,19 +103,26 @@
"visual" : {
"at" : { "x" : 608, "y" : 408 }
},
- "connect" : { "id" : "f30", "to" : "f26", "via" : [ { "x" : 608, "y" : 328 } ] }
+ "connect" : [
+ { "id" : "f30", "to" : "f26", "via" : [ { "x" : 608, "y" : 328 } ] }
+ ]
}, {
"id" : "f26",
"type" : "Alternative",
"name" : "hasRelease?",
+ "config" : {
+ "conditions" : {
+ "f35" : "in.releases.isEmpty()"
+ }
+ },
"visual" : {
"at" : { "x" : 448, "y" : 288 },
- "labelOffset" : { "x" : 16, "y" : -16 }
+ "labelOffset" : { "y" : -16 }
},
"connect" : [
{ "id" : "f35", "to" : "f11", "label" : {
"name" : "no"
- }, "condition" : "in.releases.isEmpty()" },
+ } },
{ "id" : "f27", "to" : "f22", "label" : {
"name" : "yes"
} }
@@ -114,7 +132,7 @@
"type" : "CallSubStart",
"name" : "getReleases(String)",
"config" : {
- "callSignature" : "getReleases",
+ "signature" : "getReleases",
"input" : {
"params" : [
{ "name" : "name", "type" : "String", "desc" : "Optional field" }
@@ -125,8 +143,8 @@
},
"result" : {
"params" : [
- { "name" : "releases", "type" : "java.util.List" },
- { "name" : "orgId", "type" : "Long" }
+ { "name" : "releases", "type" : "java.util.List", "desc" : "" },
+ { "name" : "orgId", "type" : "Long", "desc" : "" }
],
"map" : {
"result.releases" : "in.releases",
@@ -138,7 +156,9 @@
"at" : { "x" : 128, "y" : 528 },
"icon" : "res:/webContent/icons/uipath.png?small"
},
- "connect" : { "id" : "f39", "to" : "f37" }
+ "connect" : [
+ { "id" : "f39", "to" : "f37" }
+ ]
}, {
"id" : "f37",
"type" : "RestClientCall",
@@ -147,21 +167,27 @@
"Folders"
],
"config" : {
- "path" : "/odata/Folders",
- "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
- "clientErrorCode" : "ivy:error:rest:client",
- "statusErrorCode" : "ivy:error:rest:client",
- "resultType" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfFolderDto",
- "responseCode" : [
- "// Should throw exception if no organizationunitId found",
- "out.organizationunitId = result.value.get(0).id;"
- ]
+ "target" : {
+ "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
+ "path" : "/odata/Folders"
+ },
+ "response" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfFolderDto",
+ "code" : [
+ "// Should throw exception if no organizationunitId found",
+ "out.organizationunitId = result.value.get(0).id;"
+ ]
+ }
+ }
},
"visual" : {
"at" : { "x" : 280, "y" : 528 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f9", "to" : "f7" }
+ "connect" : [
+ { "id" : "f9", "to" : "f7" }
+ ]
}, {
"id" : "f38",
"type" : "RestClientCall",
@@ -170,36 +196,41 @@
"Releases"
],
"config" : {
- "path" : "/odata/Releases",
- "headers" : {
- "Accept" : "*/*",
- "X-Uipath-Organizationunitid" : "in.organizationunitId"
- },
- "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
- "clientErrorCode" : "ivy:error:rest:client",
- "queryParams" : {
- "mandatoryPermissions" : "",
- "atLeastOnePermissions" : "",
- "$expand" : "",
- "$filter" : "in.#filter is initialized ? in.#filter : null",
- "$select" : "",
- "$orderby" : "",
- "$top" : "",
- "$skip" : "",
- "$count" : ""
- },
- "statusErrorCode" : "ivy:error:rest:client",
- "responseMapping" : {
- "out.releases" : "result.value"
+ "target" : {
+ "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
+ "path" : "/odata/Releases",
+ "queryParams" : {
+ "mandatoryPermissions" : "",
+ "atLeastOnePermissions" : "",
+ "$expand" : "",
+ "$filter" : "in.#filter is initialized ? in.#filter : null",
+ "$select" : "",
+ "$orderby" : "",
+ "$top" : "",
+ "$skip" : "",
+ "$count" : ""
+ },
+ "headers" : {
+ "X-Uipath-Organizationunitid" : "in.organizationunitId"
+ }
},
- "resultType" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfReleaseDto",
- "responseCode" : "ivy.log.warn(\"Found release {0}\", result.value.size());"
+ "response" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfReleaseDto",
+ "map" : {
+ "out.releases" : "result.value"
+ },
+ "code" : "ivy.log.warn(\"Found release {0}\", result.value.size());"
+ }
+ }
},
"visual" : {
"at" : { "x" : 608, "y" : 528 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f42", "to" : "f41" }
+ "connect" : [
+ { "id" : "f42", "to" : "f41" }
+ ]
}, {
"id" : "f41",
"type" : "CallSubEnd",
@@ -212,27 +243,26 @@
"name" : "Get Releases",
"config" : {
"processCall" : "uiPathJob:getReleases(String)",
+ "call" : {
+ "map" : {
+ "param.name" : "in.jobName"
+ }
+ },
"output" : {
"map" : {
"out" : "in",
"out.organizationunitId" : "result.orgId",
"out.releases" : "result.releases"
}
- },
- "call" : {
- "params" : [
- { "name" : "name", "type" : "String" }
- ],
- "map" : {
- "param.name" : "in.jobName"
- }
}
},
"visual" : {
"at" : { "x" : 280, "y" : 288 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f5", "to" : "f26" }
+ "connect" : [
+ { "id" : "f5", "to" : "f26" }
+ ]
}, {
"id" : "f12",
"type" : "SubProcessCall",
@@ -245,18 +275,15 @@
"out.organizationunitId" : "result.orgId",
"out.releases" : "result.releases"
}
- },
- "call" : {
- "params" : [
- { "name" : "name", "type" : "String" }
- ]
}
},
"visual" : {
"at" : { "x" : 280, "y" : 64 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f23", "to" : "f17" }
+ "connect" : [
+ { "id" : "f23", "to" : "f17" }
+ ]
}, {
"id" : "f2",
"type" : "RestClientCall",
@@ -265,28 +292,34 @@
"Machines"
],
"config" : {
- "path" : "/odata/Machines",
- "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
- "clientErrorCode" : "ivy:error:rest:client",
- "statusErrorCode" : "ivy:error:rest:client",
- "resultType" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfExtendedMachineDto",
- "responseCode" : [
- "import com.uipath.orchestrator.MachineRobotDto;",
- "import com.uipath.orchestrator.ExtendedMachineDto;",
- "for (ExtendedMachineDto exMachineDto : result.value) {",
- " MachineRobotDto robot = new MachineRobotDto();",
- " robot.machineId = exMachineDto.id;",
- " robot.machineName = exMachineDto.name;",
- " in.machines.add(robot);",
- "}",
- "in.startInfo.machineRobots = in.machines;"
- ]
+ "target" : {
+ "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
+ "path" : "/odata/Machines"
+ },
+ "response" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfExtendedMachineDto",
+ "code" : [
+ "import com.uipath.orchestrator.MachineRobotDto;",
+ "import com.uipath.orchestrator.ExtendedMachineDto;",
+ "for (ExtendedMachineDto exMachineDto : result.value) {",
+ " MachineRobotDto robot = new MachineRobotDto();",
+ " robot.machineId = exMachineDto.id;",
+ " robot.machineName = exMachineDto.name;",
+ " in.machines.add(robot);",
+ "}",
+ "in.startInfo.machineRobots = in.machines;"
+ ]
+ }
+ }
},
"visual" : {
"at" : { "x" : 280, "y" : 680 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f8", "to" : "f3" }
+ "connect" : [
+ { "id" : "f8", "to" : "f3" }
+ ]
}, {
"id" : "f3",
"type" : "RestClientCall",
@@ -295,33 +328,41 @@
"StartJobs"
],
"config" : {
- "path" : "/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs",
- "headers" : {
- "Accept" : "*/*",
- "X-Uipath-Organizationunitid" : "in.organizationunitId"
+ "method" : "POST",
+ "target" : {
+ "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
+ "path" : "/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs",
+ "headers" : {
+ "X-Uipath-Organizationunitid" : "in.organizationunitId"
+ }
},
- "bodyObjectMapping" : {
- "param.startInfo" : "in.startInfo"
+ "body" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.StartJobsRequest",
+ "map" : {
+ "param.startInfo" : "in.startInfo"
+ }
+ }
},
- "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
- "clientErrorCode" : "ivy:error:rest:client",
- "method" : "POST",
- "statusErrorCode" : "ivy:error:rest:client",
- "bodyObjectType" : "com.uipath.orchestrator.StartJobsRequest",
- "resultType" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfJobDto",
- "bodyInputType" : "ENTITY"
+ "response" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfJobDto"
+ }
+ }
},
"visual" : {
"at" : { "x" : 448, "y" : 680 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f28", "to" : "f50" }
+ "connect" : [
+ { "id" : "f28", "to" : "f50" }
+ ]
}, {
"id" : "f49",
"type" : "CallSubStart",
"name" : "startJob(Long,String,ReleaseDto)",
"config" : {
- "callSignature" : "startJob",
+ "signature" : "startJob",
"input" : {
"params" : [
{ "name" : "orgId", "type" : "Long", "desc" : "Required field" },
@@ -346,7 +387,9 @@
"at" : { "x" : 128, "y" : 680 },
"icon" : "res:/webContent/icons/uipath.png?small"
},
- "connect" : { "id" : "f51", "to" : "f2" }
+ "connect" : [
+ { "id" : "f51", "to" : "f2" }
+ ]
}, {
"id" : "f50",
"type" : "CallSubEnd",
@@ -360,11 +403,6 @@
"config" : {
"processCall" : "uiPathJob:startJob(Long,String,com.uipath.orchestrator.ReleaseDto)",
"call" : {
- "params" : [
- { "name" : "orgId", "type" : "Long" },
- { "name" : "argument", "type" : "String" },
- { "name" : "release", "type" : "com.uipath.orchestrator.ReleaseDto" }
- ],
"map" : {
"param.orgId" : "in.organizationunitId",
"param.argument" : "in.jobArguments",
@@ -376,7 +414,9 @@
"at" : { "x" : 448, "y" : 408 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f33", "to" : "f25" }
+ "connect" : [
+ { "id" : "f33", "to" : "f25" }
+ ]
}, {
"id" : "f4",
"type" : "SubProcessCall",
@@ -384,11 +424,6 @@
"config" : {
"processCall" : "uiPathJob:startJob(Long,String,com.uipath.orchestrator.ReleaseDto)",
"call" : {
- "params" : [
- { "name" : "orgId", "type" : "Long" },
- { "name" : "argument", "type" : "String" },
- { "name" : "release", "type" : "com.uipath.orchestrator.ReleaseDto" }
- ],
"map" : {
"param.orgId" : "in.organizationunitId",
"param.release" : "in.releases.get(0)"
@@ -399,7 +434,9 @@
"at" : { "x" : 448, "y" : 176 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f19", "to" : "f15" }
+ "connect" : [
+ { "id" : "f19", "to" : "f15" }
+ ]
}, {
"id" : "f7",
"type" : "Script",
@@ -412,6 +449,8 @@
"visual" : {
"at" : { "x" : 448, "y" : 528 }
},
- "connect" : { "id" : "f13", "to" : "f38" }
+ "connect" : [
+ { "id" : "f13", "to" : "f38" }
+ ]
} ]
}
\ No newline at end of file
diff --git a/ui-path-connector/processes/uiPathRpa.p.json b/ui-path-connector/processes/uiPathRpa.p.json
index e5d9c96..33ca42a 100644
--- a/ui-path-connector/processes/uiPathRpa.p.json
+++ b/ui-path-connector/processes/uiPathRpa.p.json
@@ -1,5 +1,5 @@
{
- "format" : "10.0.0",
+ "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json",
"id" : "175F58F3612E10B1",
"kind" : "CALLABLE_SUB",
"description" : "Starts UI Path RPA jobs.",
@@ -14,30 +14,37 @@
"Read License"
],
"config" : {
- "path" : "/odata/Settings/UiPath.Server.Configuration.OData.GetLicense",
- "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
- "clientErrorCode" : "ivy:error:rest:client",
- "statusErrorCode" : ">> Ignore status",
- "responseMapping" : {
- "out.license" : "result"
+ "target" : {
+ "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
+ "path" : "/odata/Settings/UiPath.Server.Configuration.OData.GetLicense"
},
- "resultType" : "com.uipath.orchestrator.LicenseDto",
- "responseCode" : [
- "import com.axonivy.connector.uipath.OAuth2Feature;",
- "",
- "OAuth2Feature.analyzeAuth(response);"
- ]
+ "response" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.LicenseDto",
+ "map" : {
+ "out.license" : "result"
+ },
+ "code" : [
+ "import com.axonivy.connector.uipath.OAuth2Feature;",
+ "",
+ "OAuth2Feature.analyzeAuth(response);"
+ ]
+ },
+ "statusError" : ">> Ignore status"
+ }
},
"visual" : {
"at" : { "x" : 312, "y" : 64 },
- "size" : { "width" : 128, "height" : 60 },
+ "size" : { "width" : 128 },
"description" : [
"Simple request against RPA Orchestration Platform provided by UIPath",
" (mainly to enforce an active OAUTH session)"
],
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f6", "to" : "f5" }
+ "connect" : [
+ { "id" : "f6", "to" : "f5" }
+ ]
}, {
"id" : "f5",
"type" : "RestClientCall",
@@ -46,22 +53,28 @@
"Read Jobs"
],
"config" : {
- "path" : "/odata/Jobs",
- "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
- "clientErrorCode" : "ivy:error:rest:client",
- "statusErrorCode" : "ivy:error:rest:client",
- "responseMapping" : {
- "out.jobs" : "result.value"
+ "target" : {
+ "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
+ "path" : "/odata/Jobs"
},
- "resultType" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfJobDto",
- "responseCode" : "ivy.log.info(\"found \"+result.value.size()+\" RPA jobs\");"
+ "response" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfJobDto",
+ "map" : {
+ "out.jobs" : "result.value"
+ },
+ "code" : "ivy.log.info(\"found \"+result.value.size()+\" RPA jobs\");"
+ }
+ }
},
"visual" : {
"at" : { "x" : 472, "y" : 64 },
- "size" : { "width" : 128, "height" : 60 },
+ "size" : { "width" : 128 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f1", "to" : "f37" }
+ "connect" : [
+ { "id" : "f1", "to" : "f37" }
+ ]
}, {
"id" : "f0",
"type" : "RestClientCall",
@@ -70,19 +83,26 @@
"Read Robots"
],
"config" : {
- "path" : "/odata/Robots",
- "headers" : {
- "Accept" : "*/*",
- "X-Uipath-Organizationunitid" : "in.organizationunitId"
+ "target" : {
+ "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
+ "path" : "/odata/Robots",
+ "queryParams" : {
+ "$filter" : "\"Type eq 'UNATTENDED'\""
+ },
+ "headers" : {
+ "X-Uipath-Organizationunitid" : "in.organizationunitId"
+ }
},
- "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
- "clientErrorCode" : "ivy:error:rest:client",
- "method" : "GET",
- "queryParams" : {
- "$filter" : "\"Type eq 'UNATTENDED'\""
+ "response" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfRobotDto",
+ "map" : {
+ "out.robots" : "result.value"
+ },
+ "code" : "ivy.log.info(\"found \"+result.value.size()+\" RPA robots\");"
+ }
},
- "statusErrorCode" : "ivy:error:rest:client",
- "clientCode" : [
+ "code" : [
"import com.uipath.orchestrator.RobotDto;",
"import javax.ws.rs.core.GenericEntity;",
"",
@@ -90,19 +110,16 @@
"filters.add(\"Type eq 'Unattended'\");",
"",
"ivy.log.info(\"filtered:::: \"+client.queryParam(\"$filter\", filters).request().get(String.class));"
- ],
- "responseMapping" : {
- "out.robots" : "result.value"
- },
- "resultType" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfRobotDto",
- "responseCode" : "ivy.log.info(\"found \"+result.value.size()+\" RPA robots\");"
+ ]
},
"visual" : {
"at" : { "x" : 472, "y" : 224 },
- "size" : { "width" : 128, "height" : 60 },
+ "size" : { "width" : 128 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f4", "to" : "f22" }
+ "connect" : [
+ { "id" : "f4", "to" : "f22" }
+ ]
}, {
"id" : "f7",
"type" : "ProcessAnnotation",
@@ -113,7 +130,7 @@
],
"visual" : {
"at" : { "x" : 216, "y" : 160 },
- "size" : { "width" : 272, "height" : 60 }
+ "size" : { "width" : 272 }
}
}, {
"id" : "f22",
@@ -123,25 +140,31 @@
"Read Releases"
],
"config" : {
- "path" : "/odata/Releases",
- "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
- "clientErrorCode" : "ivy:error:rest:client",
- "queryParams" : {
- "$filter" : "\"contains(ProcessKey, 'order')\""
- },
- "statusErrorCode" : "ivy:error:rest:client",
- "responseMapping" : {
- "out.releases" : "result.value"
+ "target" : {
+ "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
+ "path" : "/odata/Releases",
+ "queryParams" : {
+ "$filter" : "\"contains(ProcessKey, 'order')\""
+ }
},
- "resultType" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfReleaseDto",
- "responseCode" : "ivy.log.info(\"found \"+result.value.size()+\" Process releases\");"
+ "response" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfReleaseDto",
+ "map" : {
+ "out.releases" : "result.value"
+ },
+ "code" : "ivy.log.info(\"found \"+result.value.size()+\" Process releases\");"
+ }
+ }
},
"visual" : {
"at" : { "x" : 472, "y" : 304 },
- "size" : { "width" : 128, "height" : 60 },
+ "size" : { "width" : 128 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f8", "to" : "f24" }
+ "connect" : [
+ { "id" : "f8", "to" : "f24" }
+ ]
}, {
"id" : "f24",
"type" : "RestClientCall",
@@ -150,49 +173,58 @@
"Start Job"
],
"config" : {
- "bodyObjectMapping" : {
- "param.startInfo.inputArguments" : "\"\"",
- "param.startInfo.jobPriority" : "com.uipath.orchestrator.StartProcessDto.JobPriorityEnum.NORMAL",
- "param.startInfo.jobsCount" : "0",
- "param.startInfo.noOfRobots" : "0",
- "param.startInfo.releaseKey" : "in.releases.get(0).key",
- "param.startInfo.robotIds" : "[in.robots.get(0).id]",
- "param.startInfo.source" : "com.uipath.orchestrator.StartProcessDto.SourceEnum.MANUAL",
- "param.startInfo.strategy" : "com.uipath.orchestrator.StartProcessDto.StrategyEnum.SPECIFIC"
- },
- "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
"method" : "POST",
- "statusErrorCode" : "ivy:error:rest:client",
- "bodyObjectType" : "com.uipath.orchestrator.StartJobsRequest",
- "bodyInputType" : "ENTITY",
- "responseCode" : "ivy.log.info(\"started \"+result);",
- "path" : "/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs",
- "clientErrorCode" : "ivy:error:rest:client",
- "responseMapping" : {
- "out.jobs" : "result.value"
+ "target" : {
+ "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
+ "path" : "/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs"
},
- "bodyObjectCode" : [
- "for(com.uipath.orchestrator.ReleaseDto rel : in.releases){",
- " if (rel.processKey.equals(in.jobToStart)){",
- " ivy.log.info(\"release in use \"+rel);",
- " param.startInfo.releaseKey = rel.key;",
- " }",
- "}"
- ],
- "resultType" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfJobDto"
+ "body" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.StartJobsRequest",
+ "map" : {
+ "param.startInfo.inputArguments" : "\"\"",
+ "param.startInfo.jobPriority" : "com.uipath.orchestrator.StartProcessDto.JobPriorityEnum.NORMAL",
+ "param.startInfo.jobsCount" : "0",
+ "param.startInfo.noOfRobots" : "0",
+ "param.startInfo.releaseKey" : "in.releases.get(0).key",
+ "param.startInfo.robotIds" : "[in.robots.get(0).id]",
+ "param.startInfo.source" : "com.uipath.orchestrator.StartProcessDto.SourceEnum.MANUAL",
+ "param.startInfo.strategy" : "com.uipath.orchestrator.StartProcessDto.StrategyEnum.SPECIFIC"
+ },
+ "code" : [
+ "for(com.uipath.orchestrator.ReleaseDto rel : in.releases){",
+ " if (rel.processKey.equals(in.jobToStart)){",
+ " ivy.log.info(\"release in use \"+rel);",
+ " param.startInfo.releaseKey = rel.key;",
+ " }",
+ "}"
+ ]
+ }
+ },
+ "response" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfJobDto",
+ "map" : {
+ "out.jobs" : "result.value"
+ },
+ "code" : "ivy.log.info(\"started \"+result);"
+ }
+ }
},
"visual" : {
"at" : { "x" : 472, "y" : 384 },
- "size" : { "width" : 128, "height" : 60 },
+ "size" : { "width" : 128 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f9", "to" : "f15" }
+ "connect" : [
+ { "id" : "f9", "to" : "f15" }
+ ]
}, {
"id" : "f14",
"type" : "CallSubStart",
"name" : "startJob(String)",
"config" : {
- "callSignature" : "startJob",
+ "signature" : "startJob",
"input" : {
"params" : [
{ "name" : "job", "type" : "String", "desc" : "The name of the job to start" }
@@ -208,16 +240,20 @@
"map" : {
"result.jobs" : "in.jobs"
}
- },
- "tags" : "CONNECTOR"
+ }
},
+ "tags" : [
+ "CONNECTOR"
+ ],
"visual" : {
"at" : { "x" : 88, "y" : 64 },
"labelOffset" : { "x" : 41, "y" : 37 },
"description" : "Starts a UI Path RPA job.",
"icon" : "res:/webContent/icons/uipath.png?small"
},
- "connect" : { "id" : "f17", "to" : "f3" }
+ "connect" : [
+ { "id" : "f17", "to" : "f3" }
+ ]
}, {
"id" : "f15",
"type" : "CallSubEnd",
@@ -232,20 +268,26 @@
"Folders"
],
"config" : {
- "path" : "/odata/Folders",
- "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
- "clientErrorCode" : "ivy:error:rest:client",
- "statusErrorCode" : "ivy:error:rest:client",
- "responseMapping" : {
- "out.organizationunitId" : "result.value.get(0).id"
+ "target" : {
+ "clientId" : "c700c640-4f76-4cbe-8724-dbc663d8bc0a",
+ "path" : "/odata/Folders"
},
- "resultType" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfFolderDto"
+ "response" : {
+ "entity" : {
+ "type" : "com.uipath.orchestrator.ODataValueOfIEnumerableOfFolderDto",
+ "map" : {
+ "out.organizationunitId" : "result.value.get(0).id"
+ }
+ }
+ }
},
"visual" : {
"at" : { "x" : 472, "y" : 144 },
- "size" : { "width" : 128, "height" : 60 },
+ "size" : { "width" : 128 },
"icon" : "res:/webContent/icons/uipath.png"
},
- "connect" : { "id" : "f2", "to" : "f0" }
+ "connect" : [
+ { "id" : "f2", "to" : "f0" }
+ ]
} ]
}
\ No newline at end of file