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

mweiler 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 3ed0eec41 [kie-issues-2155] Workflow Engine- Excluded User in a task  
can still claim and complete the task  (#2138)
3ed0eec41 is described below

commit 3ed0eec41e47bfeaa9a924b3de9d979aa2561ed3
Author: Christine-Jose <[email protected]>
AuthorDate: Wed Oct 22 20:31:22 2025 +0530

    [kie-issues-2155] Workflow Engine- Excluded User in a task  can still claim 
and complete the task  (#2138)
    
    * Check for excluded user
    
    * updating the readme files
    
    * moving the code to checkpermission
---
 .../README.md                                      | 87 ++++++++--------------
 .../travels/usertasks/CustomUserTaskLifeCycle.java |  7 ++
 .../process-usertasks-quarkus/README.md            | 66 +++++++---------
 .../README.md                                      | 83 ++++++++++-----------
 .../README.md                                      | 67 +++++++----------
 5 files changed, 125 insertions(+), 185 deletions(-)

diff --git 
a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/README.md 
b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/README.md
index a01919344..5677184c6 100644
--- 
a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/README.md
+++ 
b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/README.md
@@ -181,92 +181,63 @@ curl -X POST -H 'Content-Type:application/json' -H 
'Accept:application/json' -d
 ```sh
 curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/approvals
 ```
+The approval process consists of two levels. 
 
-### Show tasks
+### Start first line approval task
 
+The first line approval task is assigned to the user `manager`.Use the below 
command to get the tasks assigned to the user `manager`
 ```sh
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/tasks?user=admin&group=managers'
+curl -X 'GET' 
'http://localhost:8080/usertasks/instance?group=managers&user=manager' -H 
'accept: application/json'
 ```
 
-where `{uuid}` is the id of the given approval instance
-
-
-### Start first line approval task
-
+1. First step is to transition the first line approval task to status `start`
 ```sh
-curl -X POST -d '{"approved" : true}' -H 'Content-Type:application/json' -H 
'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/firstLineApproval/{tuuid}?phase=start&user=admin&group=managers'
+curl -X POST 
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=manager'
 -H 'accept: application/json' -H 'Content-Type: application/json' -d 
'{"transitionId": "start"}'
 ```
-
-where `{uuid}` is the id of the given approval instance and `{tuuid}` is the 
id of the task instance
+where `{taskid}` is the id of the task instance.
 
 
-### Complete first line approval task
-
+2. Second step is to `complete` the first line approval task.
 ```sh
-curl -X POST -d '{"approved" : true}' -H 'Content-Type:application/json' -H 
'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/firstLineApproval/{tuuid}?user=admin&group=managers'
+curl -X POST 
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=manager'
 -H 'accept: application/json' -H 'Content-Type: application/json' -d 
'{"transitionId": "complete"}'
 ```
+where `{taskid}` is the id of the task instance.
 
-where `{uuid}` is the id of the given approval instance and `{tuuid}` is the 
id of the task instance
+The first line of approval task is completed.
 
-### Show tasks
+### Start second line approval task
 
+Get the tasks assigned to the user `manager`
 ```sh
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/tasks?user=admin&group=managers'
+curl -X 'GET' 
'http://localhost:8080/usertasks/instance?group=managers&user=manager' -H 
'accept: application/json'
 ```
+The task `secondLineApproval` is also assigned to the user `manager`But if we 
try to transition the task with user `manager` , error will be returned.
+To maintain compliance of approval process, the same user cannot perform both 
levels of approval. Therefore, the second line approval must be completed by a 
different user.
 
-where `{uuid}` is the id of the given approval instance
-
-This should return empty response as the admin user was the first approver and 
by that can't be assigned to another one.
-
-Repeating the request with another user will return task
-
+Try with a new user `admin`
 ```sh
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/tasks?user=john&group=managers'
+curl -X GET 
'http://localhost:8080/usertasks/instance?group=managers&user=admin' -H 
'accept: application/json'
 ```
 
-### Start second line approval task
-
+1. First step is to transition the task to status `start`.
 ```sh
-curl -X POST -d '{"approved" : true}' -H 'Content-Type:application/json' -H 
'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/secondLineApproval/{tuuid}?phase=start&user=john&group=managers'
-
+curl -X POST 
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=admin'
 -H 'accept: application/json' -H 'Content-Type: application/json' -d 
'{"transitionId": "start"}'
 ```
+where `{taskid}` is of the task instance 
 
-where `{uuid}` is the id of the given approval instance and `{tuuid}` is the 
id of the task instance (careful - it is different one for different user)
-
-
-### Complete second line approval task
+2. Next step is to  `claim` the task.
 
 ```sh
-curl -X POST -d '{"approved" : true}' -H 'Content-Type:application/json' -H 
'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/secondLineApproval/{tuuid}?user=john&group=managers'
+curl -X POST 
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=admin'
 -H 'accept: application/json' -H 'Content-Type: application/json' -d 
'{"transitionId": "claim"}'
 ```
+where `{taskid}` is of the task instance
 
-where `{uuid}` is the id of the given approval instance and `{tuuid}` is the 
id of the task instance
-
-This completes the approval and returns approvals model where both approvals 
of first and second line can be found,
-plus the approver who made the first one.
+3. Final step is to `complete` the task.
 
-```json
-{
-       "approver":"admin",
-       "firstLineApproval":true,
-       "id":"2eeafa82-d631-4554-8d8e-46614cbe3bdf",
-       "secondLineApproval":true,
-       "traveller":{
-               "address":{
-                       "city":"Boston",
-                       "country":"US",
-                       "street":"main street",
-                       "zipCode":"10005"},
-               "email":"[email protected]",
-               "firstName":"John",
-               "lastName":"Doe",
-               "nationality":"American"
-       }
-}
+```sh
+curl -X POST 
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=admin'
 -H 'accept: application/json' -H 'Content-Type: application/json' -d 
'{"transitionId": "complete"}'
 ```
+where `{taskid}` is of the task instance
 
-You should see a similar message after performing the second line approval 
after the curl command
+The second line approval has also been completed, marking the end of the 
approval process.
 
-```json
-{"id":"f498de73-e02d-4829-905e-2f768479a4f1", 
"approver":"admin","firstLineApproval":true, 
"secondLineApproval":true,"traveller":{"firstName":"John","lastName":"Doe","email":"[email protected]","nationality":"American","address":{"street":"main
 street","city":"Boston","zipCode":"10005","country":"US"}}}
-```
diff --git 
a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
 
b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
index a960895e7..0bd8682f6 100644
--- 
a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
+++ 
b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomUserTaskLifeCycle.java
@@ -199,6 +199,13 @@ public class CustomUserTaskLifeCycle implements 
UserTaskLifeCycle {
             return;
         }
 
+        Set<String> excludedUsers = userTaskInstance.getExcludedUsers();
+        if (excludedUsers != null && !excludedUsers.isEmpty() && 
excludedUsers.contains(identityProvider.getName())) {
+            throw new NotAuthorizedException(String.format(
+                    "User '%s' is not authorized to perform an operation on 
user task '%s'",
+                    identityProvider.getName(), userTaskInstance.getId()));
+        }
+
         if (List.of(INACTIVE, ACTIVE, 
STARTED).contains(userTaskInstance.getStatus())) {
             // there is no user
             Set<String> users = new 
HashSet<>(userTaskInstance.getPotentialUsers());
diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/README.md 
b/kogito-quarkus-examples/process-usertasks-quarkus/README.md
index d8075e48b..729a46f81 100644
--- a/kogito-quarkus-examples/process-usertasks-quarkus/README.md
+++ b/kogito-quarkus-examples/process-usertasks-quarkus/README.md
@@ -140,69 +140,53 @@ curl -H 'Content-Type:application/json' -H 
'Accept:application/json' http://loca
 ```sh
 curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/tasks?user=admin&group=managers'
 ```
-
 where `{uuid}` is the id of the given approval instance
 
+The approval process consists of two levels.
 
 ### Complete first line approval task
 
-```sh
-curl -X POST -d '{"approved" : true}' -H 'Content-Type:application/json' -H 
'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/firstLineApproval/{tuuid}?user=admin&group=managers'
-```
-
-where `{uuid}` is the id of the given approval instance and `{tuuid}` is the 
id of the task instance
-
-### Show tasks
+The first line approval task is assigned to the user `manager`.Use the below 
command to get the tasks assigned to the user `manager`
 
 ```sh
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/tasks?user=admin&group=managers'
+curl -X GET 
'http://localhost:8080/usertasks/instance?group=managers&user=manager' -H 
'accept: application/json'
 ```
 
-where `{uuid}` is the id of the given approval instance
-
-This should return empty response as the admin user was the first approver and 
by that can't be assigned to another one.
-
-Repeating the request with another user will return task
+Use the below command to complete the first line of approval for the task 
assigned to the user `manager`.
 
 ```sh
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/tasks?user=john&group=managers'
+curl -X POST 
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=manager'
 -H 'accept: application/json' -H 'Content-Type: application/json' -d 
'{"transitionId": "complete"}'
 ```
+where `{taskid}` is the id of the task assigned to the user `manager`.
 
+First line of approval is completed.
 
 ### Complete second line approval task
 
+Get the tasks assigned to the user `manager`
 ```sh
-curl -X POST -d '{"approved" : true}' -H 'Content-Type:application/json' -H 
'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/secondLineApproval/{tuuid}?user=john&group=managers'
+curl -X 'GET' 
'http://localhost:8080/usertasks/instance?group=managers&user=manager' -H 
'accept: application/json'
 ```
+The task `secondLineApproval` is also assigned to the user `manager` But if we 
try to transition the task with user `manager` , error will be returned.
+To maintain compliance of approval process, the same user cannot perform both 
levels of approval. Therefore, the second line approval must be completed by a 
different user.
 
-where `{uuid}` is the id of the given approval instance and `{tuuid}` is the 
id of the task instance
+Get the tasks assigned to the user `admin`
 
-This completes the approval and returns approvals model where both approvals 
of first and second line can be found,
-plus the approver who made the first one.
+```sh
+curl -X GET 
'http://localhost:8080/usertasks/instance?group=managers&user=admin' -H 
'accept: application/json'
+```
+1. First step is to `claim` the task
 
-```json
-{
-       "approver":"admin",
-       "firstLineApproval":true,
-       "id":"2eeafa82-d631-4554-8d8e-46614cbe3bdf",
-       "secondLineApproval":true,
-       "traveller":{
-               "address":{
-                       "city":"Boston",
-                       "country":"US",
-                       "street":"main street",
-                       "zipCode":"10005"
-               },
-               "email":"[email protected]",
-               "firstName":"John",
-               "lastName":"Doe",
-               "nationality":"American"
-       }
-}
+```sh
+curl -X POST 
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=admin'
 -H 'accept: application/json' -H 'Content-Type: application/json' -d 
'{"transitionId": "claim"}'
 ```
+where `{taskid}` is the id of the task assigned to the user.
 
-You should see a similar message after performing the second line approval 
after the curl command
+2. Second step is to `complete` the task
 
-```json
-{"id":"f498de73-e02d-4829-905e-2f768479a4f1", 
"approver":"admin","firstLineApproval":true, 
"secondLineApproval":true,"traveller":{"firstName":"John","lastName":"Doe","email":"[email protected]","nationality":"American","address":{"street":"main
 street","city":"Boston","zipCode":"10005","country":"US"}}}
+```sh
+curl -X POST 
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=admin'
 -H 'accept: application/json' -H 'Content-Type: application/json' -d 
'{"transitionId": "complete"}'
 ```
+where `{taskid}` is the id of the task assigned to the user `admin`.
+
+The second line approval has also been completed, marking the end of the 
approval process.
diff --git 
a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/README.md
 
b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/README.md
index f50a0c6a3..798d0c2ae 100644
--- 
a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/README.md
+++ 
b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/README.md
@@ -147,90 +147,85 @@ curl -H 'Content-Type:application/json' -H 
'Accept:application/json' -H "Authori
 
 ### Show tasks
 
+Below command will list the tasks for user `john`.
+
 ```sh
 curl -H 'Content-Type:application/json' -H 'Accept:application/json' -H 
"Authorization: Bearer "$access_token 
'http://localhost:8080/approvals/{uuid}/tasks?user=john&group=employees'
 ```
+The approval process consists of two levels.
+
+### Complete first line approval task
 
-Try with the manager Mary
+From keyclock [localhost:8281/auth](http://localhost:8281)  --> `Users` screen 
 add a new user `manager` belonging to group `managers`
+Get the access_token for `manager`.
+
+The first line approval task is assigned to the user `manager`.
 
 ```sh
 export access_token=$(\
     curl -X POST 
http://localhost:8281/auth/realms/kogito/protocol/openid-connect/token \
     --user kogito-app:secret \
     -H 'content-type: application/x-www-form-urlencoded' \
-    -d 'username=mary&password=mary&grant_type=password' | jq --raw-output 
'.access_token' \
+    -d 'username=manager&password=manager&grant_type=password' | jq 
--raw-output '.access_token' \
  )
 ```
+Get the tasks assigned to the user `manager`.
 
 ```sh
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' -H 
"Authorization: Bearer "$access_token 
'http://localhost:8080/approvals/{uuid}/tasks?user=mary&group=managers'
+curl -H "Authorization: Bearer "$access_token -X GET 
'http://localhost:8080/usertasks/instance?group=managers&user=manager'  -H 
'accept: application/json'
 ```
 
-where `{uuid}` is the id of the given approval instance
-
-
-### Complete first line approval task
+The task: `firstLineApproval` needs to be transitioned to status `complete` 
for completing the first line of approval.
 
 ```sh
-curl -H "Authorization: Bearer "$access_token -X POST -d '{"approved" : true}' 
-H 'Content-Type:application/json' -H 'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/firstLineApproval/{tuuid}?user=mary&group=managers'
+curl -H "Authorization: Bearer "$access_token -X POST -H "Accept: 
application/json" -H 'Content-Type:application/json' -d '{ "transitionId": 
"complete"}'  
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=manager'
 ```
+where `{taskid}` is the id of the user task assigned to the user.
 
-where `{uuid}` is the id of the given approval instance and `{tuuid}` is the 
id of the task
+The task: `firstLineApproval` is completed by the user `manager`.
 
-### Show tasks
+### Complete the second line approval task
+
+List the tasks assigned to the user `manager`.
 
 ```sh
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' -H 
"Authorization: Bearer "$access_token 
'http://localhost:8080/approvals/{uuid}/tasks?user=mary&group=managers'
+curl -H "Authorization: Bearer "$access_token -X GET 
'http://localhost:8080/usertasks/instance?group=managers&user=manager'  -H 
'accept: application/json'
+
 ```
+The task: `secondLineApproval` is also assigned to the user  `manager`.if we 
try to transition the task: `secondLineApproval` with same user , error will be 
returned.
+To maintain compliance of approval process, the same user cannot perform both 
levels of approval. Therefore, the second-level approval must be completed by a 
different user.
 
-where `{uuid}` is the id of the given approval instance. This should return 
empty response as Mary was the first approver and by that can't be assigned to 
another one.
+Proceed to complete the task: `secondLineApproval` using an alternate approver.
+In this instance, the approval will be carried out by the user `mary`.
 
-Repeating the request with another user
+First get the access token for user `mary`.
 
 ```sh
 export access_token=$(\
     curl -X POST 
http://localhost:8281/auth/realms/kogito/protocol/openid-connect/token \
     --user kogito-app:secret \
     -H 'content-type: application/x-www-form-urlencoded' \
-    -d 'username=poul&password=poul&grant_type=password' | jq --raw-output 
'.access_token' \
+    -d 'username=mary&password=mary&grant_type=password' | jq --raw-output 
'.access_token' \
  )
 ```
-
+List the tasks assigned to user `mary`.
 ```sh
-curl -H 'Content-Type:application/json' -H 'Accept:application/json' -H 
"Authorization: Bearer "$access_token 
'http://localhost:8080/approvals/{uuid}/tasks?user=poul&group=managers'
+curl -H "Authorization: Bearer "$access_token -X GET 
'http://localhost:8080/usertasks/instance?group=managers&user=mary'  -H 
'accept: application/json'
 ```
+Now we have the id for the second level approval task.
 
-Now we have the id for the second approval task
+1. First step is to `claim` the task.
+```sh
+curl -H "Authorization: Bearer "$access_token -X POST -H "Accept: 
application/json" -H 'Content-Type:application/json' -d '{ "transitionId": 
"claim"}'  
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=mary'
+```
+where `{taskid}` is the id of the task assigned to the user.
 
-### Complete second line approval task
 
+2. Second step is to `complete` the task.
 ```sh
-curl -H "Authorization: Bearer "$access_token -X POST -d '{"approved" : true}' 
-H 'Content-Type:application/json' -H 'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/secondLineApproval/{tuuid}?user=poul&group=managers'
+curl -H "Authorization: Bearer "$access_token -X POST -H "Accept: 
application/json" -H 'Content-Type:application/json' -d '{ "transitionId": 
"complete"}'  
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=mary'
 ```
+where `{taskid}` is the id of the task assigned to the user.
 
-where `{uuid}` is the id of the given approval instance and `{tuuid}` is the 
id of the task instance
-
-This completes the approval and returns approvals model where both approvals 
of first and second line can be found,
-plus the approver who made the first one.
+The second line approval has also been completed, marking the end of the 
approval process.
 
-```json
-{
-  "approver": "mary",
-  "firstLineApproval": true,
-  "id": "20fcafed-255e-4e1b-b00f-9943aabb47fd",
-  "secondLineApproval": true,
-  "traveller": {
-    "address": {
-      "city": "Boston",
-      "country": "US",
-      "street": "main street",
-      "zipCode": "10005"
-    },
-    "email": "[email protected]",
-    "firstName": "John",
-    "lastName": "Doe",
-    "nationality": "American"
-  }
-}
-
-```
diff --git 
a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/README.md 
b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/README.md
index bc5f77fb8..f88dbe4e0 100644
--- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/README.md
+++ b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/README.md
@@ -115,66 +115,49 @@ curl -u john:john -H 'Content-Type:application/json' -H 
'Accept:application/json
 ```
 
 ### Show tasks
+Get the tasks assigned to the user `manager`
 
 ```sh
-curl -u john:john -H 'Content-Type:application/json' -H 
'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/tasks?user=john&group=managers'
+curl -X GET 
'http://localhost:8080/usertasks/instance?group=managers&user=manager' -H 
'accept: application/json'
 ```
 
-where `{uuid}` is the id of the given approval instance
-
-
 ### Complete first line approval task
+First line approval task is assigned to the user `manager`.
+So use the below command to complete the first line of approval for the task.
 
 ```sh
-curl -u john:john -X POST -d '{"approved" : true}' -H 
'Content-Type:application/json' -H 'Accept:application/json' 
http://localhost:8080/approvals/{uuid}/firstLineApproval/{tuuid}?user=john&group=managers'
+curl -X POST 
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=manager'
 -H 'accept: application/json' -H 'Content-Type: application/json' -d 
'{"transitionId": "complete"}'
 ```
+where `{taskid}` is the id of the task instance.
 
-where `{uuid}` is the id of the given approval instance and `{tuuid}` is the 
id of the task instance
+First line of approval is completed by the user `manager`
 
-### Show tasks
+### Complete second line approval task
 
+Get the tasks assigned to the user `manager`
 ```sh
-curl -u john:john -H 'Content-Type:application/json' -H 
'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/tasks?user=john&group=managers'
+curl -X 'GET' 
'http://localhost:8080/usertasks/instance?group=managers&user=manager' -H 
'accept: application/json'
 ```
+The task `secondLineApproval` is also assigned to the user `manager` But if we 
try to transition the task with user `manager` , error will be returned.
+To maintain compliance of approval process, the same user cannot perform both 
levels of approval. Therefore, the second-level approval must be completed by a 
different user.
 
-where `{uuid}` is the id of the given approval instance
-
-This should return empty response as the admin user was the first approver and 
by that can't be assigned to another one.
+Get the tasks assigned to the user `admin`
 
-Repeating the request with another user will return task
-
-```
-curl -u mary:mary -H 'Content-Type:application/json' -H 
'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/tasks?user=mary&group=managers'
+```sh
+curl -X GET 
'http://localhost:8080/usertasks/instance?group=managers&user=admin' -H 
'accept: application/json'
 ```
+1. First step is to `claim` the task
 
-
-### Complete second line approval task
-
-```
-curl -u mary:mary -X POST -d '{"approved" : true}' -H 
'Content-Type:application/json' -H 'Accept:application/json' 
'http://localhost:8080/approvals/{uuid}/secondLineApproval/{tuuid}?user=mary&group=managers'
+```sh
+curl -X POST 
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=admin'
 -H 'accept: application/json' -H 'Content-Type: application/json' -d 
'{"transitionId": "claim"}'
 ```
+where `{taskid}` is the id of the task assigned to the user.
 
-where `{uuid}` is the id of the given approval instance and `{tuuid}` is the 
id of the task instance
+2. Second step is to `complete` the task
 
-This completes the approval and returns approvals model where both approvals 
of first and second line can be found,
-plus the approver who made the first one.
-
-```json
-{
-       "approver":"john",
-       "firstLineApproval":true,
-       "id":"2eeafa82-d631-4554-8d8e-46614cbe3bdf",
-       "secondLineApproval":true,
-       "traveller":{
-               "address":{
-                       "city":"Boston",
-                       "country":"US",
-                       "street":"main street",
-                       "zipCode":"10005"},
-               "email":"[email protected]",
-               "firstName":"John",
-               "lastName":"Doe",
-               "nationality":"American"
-       }
-}
+```sh
+curl -X POST 
'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=admin'
 -H 'accept: application/json' -H 'Content-Type: application/json' -d 
'{"transitionId": "complete"}'
 ```
+where `{taskid}` is the id of the task assigned to the user.
+
+The second line approval has also been completed, marking the end of the 
approval process.


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

Reply via email to