From 9e70b4c369b786363e1d71334fe69c57d3a90ba8 Mon Sep 17 00:00:00 2001 From: "Nam.Chu" Date: Mon, 25 Nov 2024 10:10:31 +0700 Subject: [PATCH] IVYPORTAL-17898-Apdat-case-owner-in-Portal - fix exception in internal support --- .../testProcesses/CaseOwner.p.json | 63 +++++++++++-------- 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/Showcase/InternalSupport/processes/Business Processes/testProcesses/CaseOwner.p.json b/Showcase/InternalSupport/processes/Business Processes/testProcesses/CaseOwner.p.json index c43c6e6728..6aa3b1d10e 100644 --- a/Showcase/InternalSupport/processes/Business Processes/testProcesses/CaseOwner.p.json +++ b/Showcase/InternalSupport/processes/Business Processes/testProcesses/CaseOwner.p.json @@ -169,48 +169,59 @@ "output" : { "code" : [ "import ch.ivyteam.ivy.security.ISecurityContext;", - "ivy.case.owners().add(ISecurityContext.current().users().find(\"demo\"));", - "ivy.case.owners().add(ISecurityContext.current().users().find(\"admin\"));", - "ivy.case.owners().add(ISecurityContext.current().roles().find(\"CaseOwner\"));", - "ivy.case.owners().add(ISecurityContext.current().roles().find(\"HR\"));", - "ivy.case.owners().add(ISecurityContext.current().users().find(\"Developer\"));", - "ivy.case.owners().add(ISecurityContext.current().users().find(\"david\"));", - "ivy.case.owners().add(ISecurityContext.current().users().find(\"peter\"));", - "ivy.case.owners().add(ISecurityContext.current().roles().find(\"Sales\"));", - "ivy.case.owners().add(ISecurityContext.current().users().find(\"guest\"));" + "if (ISecurityContext.current().users().find(\"demo\") != null){", + " ivy.case.owners().add(ISecurityContext.current().users().find(\"demo\")); ", + "}", + "", + "if (ISecurityContext.current().users().find(\"admin\") != null){", + " ivy.case.owners().add(ISecurityContext.current().users().find(\"admin\"));", + "}", + "", + "if (ISecurityContext.current().roles().find(\"CaseOwner\") != null){", + " ivy.case.owners().add(ISecurityContext.current().roles().find(\"CaseOwner\"));", + "", + "}", + "", + "if (ISecurityContext.current().roles().find(\"HR\") != null){", + " ivy.case.owners().add(ISecurityContext.current().roles().find(\"HR\"));", + "}" ] - } + }, + "sudo" : true }, "visual" : { "at" : { "x" : 224, "y" : 280 } }, "connect" : [ - { "id" : "f18", "to" : "f17" } + { "id" : "f18", "to" : "f22", "var" : "in1" } ] }, { - "id" : "f17", - "type" : "TaskSwitchEvent", + "id" : "f19", + "type" : "TaskEnd", + "visual" : { + "at" : { "x" : 448, "y" : 280 }, + "labelOffset" : { "x" : 13, "y" : 33 } + } + }, { + "id" : "f22", + "type" : "TaskSwitchGateway", "config" : { - "task" : { - "name" : "Task with multiple case owners" - }, + "tasks" : [ { + "id" : "TaskA", + "name" : "Task with multiple case owners", + "responsible" : { + "activator" : "CREATOR" + } + } ], "case" : { "name" : "Case with multiple owners" } }, "visual" : { - "at" : { "x" : 352, "y" : 280 }, - "labelOffset" : { "x" : 14, "y" : 34 } + "at" : { "x" : 352, "y" : 280 } }, "connect" : [ - { "id" : "f20", "to" : "f19" } + { "id" : "f21", "to" : "f19", "condition" : "ivp==\"TaskA.ivp\"" } ] - }, { - "id" : "f19", - "type" : "TaskEnd", - "visual" : { - "at" : { "x" : 448, "y" : 280 }, - "labelOffset" : { "x" : 13, "y" : 33 } - } } ] } \ No newline at end of file