This is an automated email from the ASF dual-hosted git repository.

pefernan pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new 44be542b1 [Incubator-kie-issues-1888] Updated Readme files to use new 
generic usertasks api (#2093)
44be542b1 is described below

commit 44be542b12293b3c455798a333697927f562b391
Author: Deepak Joseph <[email protected]>
AuthorDate: Sun Apr 6 02:14:02 2025 +0530

    [Incubator-kie-issues-1888] Updated Readme files to use new generic 
usertasks api (#2093)
    
    * Updated usertasks api
    
    * Undo yarn.lock
---
 .../README.md                                      | 32 +++---------
 .../process-kafka-persistence-quarkus/README.md    | 29 +++--------
 .../process-mongodb-persistence-quarkus/README.md  | 29 +++--------
 .../process-quarkus-example/README.md              | 58 ++++++++-------------
 .../README.md                                      | 25 ++-------
 .../README.md                                      | 50 +++++++-----------
 .../process-springboot-example/README.md           | 59 +++++++++-------------
 7 files changed, 86 insertions(+), 196 deletions(-)

diff --git 
a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/README.md 
b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/README.md
index b1a45052e..f8d2f37bf 100644
--- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/README.md
+++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/README.md
@@ -168,12 +168,11 @@ To make use of this application it is as simple as 
putting a sending request to
        "country" : "US" }
   }
 }
-
 ```
 
 Complete curl command can be found below:
 
-```
+```sh
 curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' 
-d '{"name" : "my fancy deal", "traveller" : { "firstName" : "John", "lastName" 
: "Doe", "email" : "[email protected]", "nationality" : "American","address" 
: { "street" : "main street", "city" : "Boston", "zipCode" : "10005", "country" 
: "US" }}}' http://localhost:8080/deals
 ```
 
@@ -181,38 +180,21 @@ this will then trigger the review user task that you can 
work.
 
 ### Get review task for given deal
 
-First you can display all active reviews of deals
-
-```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews
-```
-
-based on the response you can select one of the reviews to see more details
-
-```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews/{uuid}/tasks?user=john
-```
-
-where uuid is the id of the deal review you want to work with.
-
-Next you can get the details assigned to review user task by
+You can display all active reviews of deals by running
 
-```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews/{uuid}/review/{tuuid}?user=john
+```sh
+curl http://localhost:8080/usertasks/instance?user=john
 ```
 
-where uuid is the id of the deal review and tuuid is the id of the user task 
you want to get
-
-
 ### Complete review task for given deal
 
 Last but not least you can complete review user task by
 
-```
-curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' 
-d '{"review" : "very good work"}' 
http://localhost:8080/dealreviews/{uuid}/review/{tuuid}?user=john
+```sh
+curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' 
-d '{"transitionId":"complete","data":{"review" : "very good work"}}' 
http://localhost:8080/usertasks/instance/{tuuid}/transition?user=john
 ```
 
-where uuid is the id of the deal review and tuuid is the id of the user task 
you want to get
+where tuuid is the id of the user task you want to complete
 
 * Review Log should look similar to
 
diff --git 
a/kogito-quarkus-examples/process-kafka-persistence-quarkus/README.md 
b/kogito-quarkus-examples/process-kafka-persistence-quarkus/README.md
index 5e64654c0..650b42c90 100644
--- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/README.md
+++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/README.md
@@ -165,38 +165,21 @@ this will then trigger the review user task that you can 
work.
 
 ### Get review task for given deal
 
-First you can display all active reviews of deals
+You can display all active reviews of deals by running
 
+```sh
+curl http://localhost:8080/usertasks/instance?user=john
 ```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews
-```
-
-based on the response you can select one of the reviews to see more details
-
-```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews/{uuid}/tasks?user=john
-```
-
-where uuid is the id of the deal review you want to work with.
-
-Next you can get the details assigned to review user task by
-
-```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews/{uuid}/review/{tuuid}?user=john
-```
-
-where uuid is the id of the deal review and tuuid is the id of the user task 
you want to get
-
 
 ### Complete review task for given deal
 
 Last but not least you can complete review user task by
 
-```
-curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' 
-d '{"review" : "very good work"}' 
http://localhost:8080/dealreviews/{uuid}/review/{tuuid}?user=john
+```sh
+curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' 
-d '{"transitionId":"complete","data":{"review" : "very good work"}}' 
http://localhost:8080/usertasks/instance/{tuuid}/transition?user=john
 ```
 
-where uuid is the id of the deal review and tuuid is the id of the user task 
you want to get
+where tuuid is the id of the user task you want to complete
 
 * Review Log should look similar to
 
diff --git 
a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/README.md 
b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/README.md
index 4c1d628dd..f03ca2666 100644
--- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/README.md
+++ b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/README.md
@@ -179,38 +179,21 @@ this will then trigger the review user task that you can 
work with.
 
 ### Get review task for given deal
 
-First you can display all active reviews of deals
+You can display all active reviews of deals by running
 
+```sh
+curl http://localhost:8080/usertasks/instance?user=john
 ```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews
-```
-
-based on the response you can select one of the reviews to see more details
-
-```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews/{uuid}/tasks?user=john
-```
-
-where uuid is the id of the deal review you want to work with.
-
-Next you can get the details assigned to review user task by
-
-```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews/{uuid}/review/{tuuid}?user=john
-```
-
-where uuid is the id of the deal review and tuuid is the id of the user task 
you want to get
-
 
 ### Complete review task for given deal
 
 Last but not least you can complete review user task by
 
-```
-curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' 
-d '{"review" : "very good work"}' 
http://localhost:8080/dealreviews/{uuid}/review/{tuuid}?user=john
+```sh
+curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' 
-d '{"transitionId":"complete","data":{"review" : "very good work"}}' 
http://localhost:8080/usertasks/instance/{tuuid}/transition?user=john
 ```
 
-where uuid is the id of the deal review and tuuid is the id of the user task 
you want to get
+where tuuid is the id of the user task you want to complete
 
 * Review Log should look similar to
 
diff --git a/kogito-quarkus-examples/process-quarkus-example/README.md 
b/kogito-quarkus-examples/process-quarkus-example/README.md
index d03a817ac..178779693 100644
--- a/kogito-quarkus-examples/process-quarkus-example/README.md
+++ b/kogito-quarkus-examples/process-quarkus-example/README.md
@@ -236,64 +236,50 @@ Example response:
 ]
 ```
 
-### GET /orderItems/{id}/tasks
+### GET /usertasks/instance?user={user}
 
 Getting user tasks awaiting user action
 
 ```sh
-curl -X GET 
http://localhost:8080/orderItems/66c11e3e-c211-4cee-9a07-848b5e861bc5/tasks?user=john
+curl -X GET http://localhost:8080/usertasks/instance?user=john
 ```
 Example response:
 
 ```json
 [
-  {"id":"62f1c985-d31c-4ead-9906-2fe8d05937f0","name":"Verify order"}
-]
-```
-
-### GET /orderItems/{id}/Verify_order/{tid}
-
-Getting user task details
-
-```sh
-curl -X GET 
http://localhost:8080/orderItems/66c11e3e-c211-4cee-9a07-848b5e861bc5/Verify_order/62f1c985-d31c-4ead-9906-2fe8d05937f0?user=john
-```
-Example response:
-
-```json
-{
-  "id":"62f1c985-d31c-4ead-9906-2fe8d05937f0",
-  "input1":
   {
-    "orderNumber":"12345",
-    "shipped":false,
-    "total":0.537941914075738
-  },
-  "name":"Verify order"
-}
+    "id": "1dd3123a-aa2c-4b68-93c3-fd0c2abe76c8",
+    "userTaskId": "UserTask_1",
+    "status": {
+      "terminate": null,
+      "name": "Reserved"
+    },
+    "taskName": "Verify order",
+    ...
+]
 ```
 
-### POST /orderItems/{id}/Verify_order/{tid}
+### POST /usertasks/instance/{taskId}/transition?user={user}
 
 Complete user task
 
 ```sh
-curl -d '{}' -H "Content-Type: application/json" -X POST 
http://localhost:8080/orderItems/66c11e3e-c211-4cee-9a07-848b5e861bc5/Verify_order/62f1c985-d31c-4ead-9906-2fe8d05937f0?user=john
+curl -d '{"transitionId": "complete"}' -H "Content-Type: application/json" -X 
POST 
http://localhost:8080/usertasks/instance/1dd3123a-aa2c-4b68-93c3-fd0c2abe76c8/transition?user=john
 ```
 
-
 As response the updated order is returned.
 
 Example response:
 
 ```json
 {
-  "id":"66c11e3e-c211-4cee-9a07-848b5e861bc5",
-  "order":
-  {
-    "orderNumber":"12345",
-    "shipped":false,
-    "total":0.537941914075738
-  }
-}
+  "id": "1dd3123a-aa2c-4b68-93c3-fd0c2abe76c8",
+  "userTaskId": "UserTask_1",
+  "status": {
+    "terminate": "COMPLETED",
+    "name": "Completed"
+  },
+  "taskName": "Verify order",
+  ...
+]
 ```
diff --git 
a/kogito-springboot-examples/process-infinispan-persistence-springboot/README.md
 
b/kogito-springboot-examples/process-infinispan-persistence-springboot/README.md
index 2d0f0c860..64d5e012b 100644
--- 
a/kogito-springboot-examples/process-infinispan-persistence-springboot/README.md
+++ 
b/kogito-springboot-examples/process-infinispan-persistence-springboot/README.md
@@ -138,38 +138,21 @@ this will then trigger the review user task that you can 
work.
 
 ### Get review task for given deal
 
-First you can display all active reviews of deals
+You can display all active reviews of deals by running
 
 ```sh
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews
+curl http://localhost:8080/usertasks/instance?user=john
 ```
 
-based on the response you can select one of the reviews to see more details
-
-```sh
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews/{uuid}/tasks?user=john
-```
-
-where uuid is the id of the deal review you want to work with.
-
-Next you can get the details assigned to review user task by
-
-```sh
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews/{uuid}/review/{tuuid}?user=john
-```
-
-where uuid is the id of the deal review and tuuid is the id of the user task 
you want to get
-
-
 ### Complete review task for given deal
 
 Last but not least you can complete review user task by
 
 ```sh
-curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' 
-d '{"review" : "very good work"}' 
http://localhost:8080/dealreviews/{uuid}/review/{tuuid}?user=john
+curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' 
-d '{"transitionId":"complete","data":{"review" : "very good work"}}' 
http://localhost:8080/usertasks/instance/{tuuid}/transition?user=john
 ```
 
-where uuid is the id of the deal review and tuuid is the id of the user task 
you want to get
+where tuuid is the id of the user task you want to complete
 
 * Review Log should look similar to
 
diff --git 
a/kogito-springboot-examples/process-mongodb-persistence-springboot/README.md 
b/kogito-springboot-examples/process-mongodb-persistence-springboot/README.md
index 711e2711d..ee8f02016 100644
--- 
a/kogito-springboot-examples/process-mongodb-persistence-springboot/README.md
+++ 
b/kogito-springboot-examples/process-mongodb-persistence-springboot/README.md
@@ -119,18 +119,18 @@ In addition, various clients to interact with this 
service can be easily generat
 
 To make use of this application it is as simple as putting a sending request 
to `http://localhost:8080/deals`  with following content 
 
-```
+```json
 {
 "name" : "my fancy deal",
-"traveller" : { 
-  "firstName" : "John", 
-  "lastName" : "Doe", 
-  "email" : "[email protected]", 
+"traveller" : {
+  "firstName" : "John",
+  "lastName" : "Doe",
+  "email" : "[email protected]",
   "nationality" : "American",
-  "address" : { 
-       "street" : "main street", 
-       "city" : "Boston", 
-       "zipCode" : "10005", 
+  "address" : {
+       "street" : "main street",
+       "city" : "Boston",
+       "zipCode" : "10005",
        "country" : "US" }
   }
 }
@@ -147,43 +147,27 @@ this will then trigger the review user task that you can 
work with.
 
 ### Get review task for given deal
 
-First you can display all active reviews of deals
-
-```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews
-```
-
-based on the response you can select one of the reviews to see more details
+You can display all active reviews of deals by running
 
+```sh
+curl http://localhost:8080/usertasks/instance?user=john
 ```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews/{uuid}/tasks?user=john
-```
-
-where uuid is the id of the deal review you want to work with.
-
-Next you can get the details assigned to review user task by
-
-```
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/dealreviews/{uuid}/review/{tuuid}?user=john
-```
-
-where uuid is the id of the deal review and tuuid is the id of the user task 
you want to get
-
 
 ### Complete review task for given deal
 
 Last but not least you can complete review user task by
 
-```
-curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' 
-d '{"review" : "very good work"}' 
http://localhost:8080/dealreviews/{uuid}/review/{tuuid}?user=john
+```sh
+curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' 
-d '{"transitionId":"complete","data":{"review" : "very good work"}}' 
http://localhost:8080/usertasks/instance/{tuuid}/transition?user=john
 ```
 
-where uuid is the id of the deal review and tuuid is the id of the user task 
you want to get
+where tuuid is the id of the user task you want to complete
 
-* Review Log should look similar to    
+* Review Log should look similar to
 
 ```
 Review of the deal very good work for traveller Doe
 ```
+
 You can also query the process instance information and model variables from 
the database and review the same using tools like MongoDB Compass, download 
community version from below link
 https://www.mongodb.com/try/download/compass
diff --git a/kogito-springboot-examples/process-springboot-example/README.md 
b/kogito-springboot-examples/process-springboot-example/README.md
index 007daf6ad..faf0677fe 100644
--- a/kogito-springboot-examples/process-springboot-example/README.md
+++ b/kogito-springboot-examples/process-springboot-example/README.md
@@ -145,61 +145,50 @@ Example response:
 ]
 ```
 
-### GET /orderItems/{id}/tasks
+### GET /usertasks/instance?user={user}
 
 Getting user tasks awaiting user action
 
 ```sh
-curl -X GET 
http://localhost:8080/orderItems/66c11e3e-c211-4cee-9a07-848b5e861bc5/tasks?user=john
+curl -X GET http://localhost:8080/usertasks/instance?user=john
 ```
 Example response:
-```json
-[
-  {"id":"62f1c985-d31c-4ead-9906-2fe8d05937f0","name":"Verify order"}
-]
-```
-
-### GET /orderItems/{id}/Verify_order/{tid}
 
-Getting user task details
-
-```sh
-curl -X GET 
http://localhost:8080/orderItems/66c11e3e-c211-4cee-9a07-848b5e861bc5/Verify_order/62f1c985-d31c-4ead-9906-2fe8d05937f0?user=john
-```
-Example response:
 ```json
-{
-  "id":"62f1c985-d31c-4ead-9906-2fe8d05937f0",
-  "input1":
+[
   {
-    "orderNumber":"12345",
-    "shipped":false,
-    "total":0.537941914075738
-  },
-  "name":"Verify order"
-}
+    "id": "1dd3123a-aa2c-4b68-93c3-fd0c2abe76c8",
+    "userTaskId": "UserTask_1",
+    "status": {
+      "terminate": null,
+      "name": "Reserved"
+    },
+    "taskName": "Verify order",
+    ...
+]
 ```
 
-### POST /orderItems/{id}/Verify_order/{tid}
+### POST /usertasks/instance/{taskId}/transition?user={user}
 
 Complete user task
 
 ```sh
-curl -d '{}' -H "Content-Type: application/json" -X POST 
http://localhost:8080/orderItems/66c11e3e-c211-4cee-9a07-848b5e861bc5/Verify_order/62f1c985-d31c-4ead-9906-2fe8d05937f0?user=john
+curl -d '{"transitionId": "complete"}' -H "Content-Type: application/json" -X 
POST 
http://localhost:8080/usertasks/instance/1dd3123a-aa2c-4b68-93c3-fd0c2abe76c8/transition?user=john
 ```
 
-
 As response the updated order is returned.
 
 Example response:
+
 ```json
 {
-  "id":"66c11e3e-c211-4cee-9a07-848b5e861bc5",
-  "order":
-  {
-    "orderNumber":"12345",
-    "shipped":false,
-    "total":0.537941914075738
-  }
-}
+  "id": "1dd3123a-aa2c-4b68-93c3-fd0c2abe76c8",
+  "userTaskId": "UserTask_1",
+  "status": {
+    "terminate": "COMPLETED",
+    "name": "Completed"
+  },
+  "taskName": "Verify order",
+  ...
+]
 ```


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to