From dc6eda46c56a4c4350a962d29c472844f73027d4 Mon Sep 17 00:00:00 2001 From: Lukas Lieb Date: Mon, 18 Sep 2023 10:10:26 +0200 Subject: [PATCH] Fix new missing webservice client id warning - Refactor error handling demo from WebServiceCall activities to Scripts --- .../processes/Booking/Booking.p.json | 8 +- .../processes/Booking/Service/Car.p.json | 8 +- .../processes/Booking/Service/Flight.p.json | 75 ++++++++++++------- 3 files changed, 54 insertions(+), 37 deletions(-) diff --git a/error-handling/error-handling-demos/processes/Booking/Booking.p.json b/error-handling/error-handling-demos/processes/Booking/Booking.p.json index 702d9136f..d8a840b8e 100644 --- a/error-handling/error-handling-demos/processes/Booking/Booking.p.json +++ b/error-handling/error-handling-demos/processes/Booking/Booking.p.json @@ -73,8 +73,7 @@ "errorCode" : "booking:flight:failed" }, "visual" : { - "at" : { "x" : 352, "y" : 160 }, - "labelOffset" : { "x" : 19, "y" : 0 } + "at" : { "x" : 352, "y" : 160 } }, "connect" : [ { "id" : "f10", "to" : "f9", "via" : [ { "x" : 352, "y" : 288 } ] } @@ -101,8 +100,7 @@ "errorCode" : "booking:car:failed" }, "visual" : { - "at" : { "x" : 512, "y" : 160 }, - "labelOffset" : { "x" : 18, "y" : 1 } + "at" : { "x" : 512, "y" : 160 } }, "connect" : [ { "id" : "f12", "to" : "f11" } @@ -186,7 +184,7 @@ }, "visual" : { "at" : { "x" : 752, "y" : 128 }, - "labelOffset" : { "x" : -18, "y" : 38 } + "labelOffset" : { "x" : 17, "y" : 41 } } } ], "layout" : { diff --git a/error-handling/error-handling-demos/processes/Booking/Service/Car.p.json b/error-handling/error-handling-demos/processes/Booking/Service/Car.p.json index 35cde4b0b..ed7b69d8e 100644 --- a/error-handling/error-handling-demos/processes/Booking/Service/Car.p.json +++ b/error-handling/error-handling-demos/processes/Booking/Service/Car.p.json @@ -23,7 +23,7 @@ "labelOffset" : { "x" : 14, "y" : 37 } }, "connect" : [ - { "id" : "f4", "to" : "f3" } + { "id" : "f2", "to" : "f5" } ] }, { "id" : "f1", @@ -32,8 +32,8 @@ "at" : { "x" : 352, "y" : 64 } } }, { - "id" : "f3", - "type" : "WebServiceCall", + "id" : "f5", + "type" : "Script", "name" : "remote booking", "config" : { "output" : { @@ -47,7 +47,7 @@ "at" : { "x" : 224, "y" : 64 } }, "connect" : [ - { "id" : "f2", "to" : "f1" } + { "id" : "f3", "to" : "f1" } ] } ] } \ No newline at end of file diff --git a/error-handling/error-handling-demos/processes/Booking/Service/Flight.p.json b/error-handling/error-handling-demos/processes/Booking/Service/Flight.p.json index b4c61ad45..65ff81cae 100644 --- a/error-handling/error-handling-demos/processes/Booking/Service/Flight.p.json +++ b/error-handling/error-handling-demos/processes/Booking/Service/Flight.p.json @@ -23,11 +23,10 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 64 }, - "labelOffset" : { "x" : -40, "y" : 37 } + "at" : { "x" : 96, "y" : 64 } }, "connect" : [ - { "id" : "f4", "to" : "f3" } + { "id" : "f2", "to" : "f15" } ] }, { "id" : "f1", @@ -35,26 +34,6 @@ "visual" : { "at" : { "x" : 512, "y" : 64 } } - }, { - "id" : "f3", - "type" : "WebServiceCall", - "name" : "register customer", - "visual" : { - "at" : { "x" : 224, "y" : 64 } - }, - "connect" : [ - { "id" : "f6", "to" : "f5" } - ] - }, { - "id" : "f5", - "type" : "WebServiceCall", - "name" : "book flight", - "visual" : { - "at" : { "x" : 384, "y" : 64 } - }, - "connect" : [ - { "id" : "f2", "to" : "f1" } - ] }, { "id" : "f7", "type" : "ErrorStartEvent", @@ -107,11 +86,10 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 288 }, - "labelOffset" : { "x" : -40, "y" : 37 } + "at" : { "x" : 96, "y" : 288 } }, "connect" : [ - { "id" : "f14", "to" : "f13" } + { "id" : "f6", "to" : "f5" } ] }, { "id" : "f11", @@ -120,9 +98,50 @@ "at" : { "x" : 512, "y" : 288 } } }, { - "id" : "f13", - "type" : "WebServiceCall", + "id" : "f15", + "type" : "Script", + "name" : "register customer", + "config" : { + "output" : { + "code" : "ivy.log.info(\"register customer\");" + } + }, + "visual" : { + "at" : { "x" : 224, "y" : 64 } + }, + "connect" : [ + { "id" : "f3", "to" : "f16" } + ] + }, { + "id" : "f16", + "type" : "Script", + "name" : "book flight", + "config" : { + "output" : { + "code" : [ + "import ch.ivyteam.ivy.bpm.error.BpmError;", + "", + "if (Math.random() > 0.5) {", + " BpmError.create(\"ivy:error:webservice:exception\").throwError();", + "}" + ] + } + }, + "visual" : { + "at" : { "x" : 392, "y" : 64 } + }, + "connect" : [ + { "id" : "f4", "to" : "f1" } + ] + }, { + "id" : "f5", + "type" : "Script", "name" : "cancel flight", + "config" : { + "output" : { + "code" : "ivy.log.info(\"Cancel flight\");" + } + }, "visual" : { "at" : { "x" : 288, "y" : 288 } },