Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Assign task to multiple users in parallel

Avatar

Former Community Member
I am using Adobe Livecycle ES.I have used the User service(Process management)to assign task to specific user for sequential routing.



How to assign task to multiple users in parallel routing using User Service? ( the number of users are varied at run time)
12 Replies

Avatar

Former Community Member
If you would like to execute events in parallel, select the "Gateway" service. This will allow you to run sequences of services in parallel including the assignment of different tasks to users.

Avatar

Level 10
It's a bit tricky to assign task to a variable number of users. The Gateway service is good, but when you know the number of user ahead of time.



If you don't know the number of users ahead of time, you'll need to be a bit creative and use the Gateway service (to assign the task to a user) and then loopback to it n number of times so that multiple users will get the item.



Then the other part you'll need to worry about is when users will complete their task. You'll need to have a condition outside of the Gateway to check if all users a done, before moving forward with the rest of the process.



Jasmin

Avatar

Former Community Member
Hi, just to follow through on this thought, I have a gateway which assigns tasks in parallel properly. What I'm having problems with is that as soon as one person is done I want to remove the tasks from the other users worklists. I wish that I didn't have to but the client has requested that it be done in this manner. Is there a "task terminating" service that would enable me to remove items from peoples' worklists?

Avatar

Level 10
What I've done in the past for that use case is use Events with the CompleteTask operation.



Every time a user completes a task, there is a Task Complete Event that gets generated. You can create another process that will catch the Task Complete event and pass the task ID.



Now the tricky part is to get all other Task IDs for the other users you want to force the task completion. You might need an API call or a query against the database to get that list.



Once you have the list of the Task IDs you want to complete, you can use the CompleteTask service to force the completion.



Jasmin

Avatar

Former Community Member
I am able to create more user tasks in parralel but I don't know, how to obtain filled forms back from theese user tasks. I thought to use TaskCompletedWithData event but I don't know how to get the form data from the event. Could anyone help, pleae.

Avatar

Former Community Member
Another quick follow up, i'm having problems finding a way to use the completeTask function on a task that is NOT assigned to the user that i specified in the connection properties. I tried using the administrator login info for the connection properties and i get an exception saying that the task is not assigned to the user;



com.adobe.idp.taskmanager.dsc.client.task.TaskPermissionException: User: E1B55006-6542-195B-25DF-E95844A96AD0 is not assigned task: 7902. The task cannot be completed



I was wondering if there was a way to completeTask regardless of the connection properties?

Avatar

Level 10
You can't complete a task you don't own using the CompleteTask. That just the way the security work in LiveCycle.



With the API, I think there is a way you can complete a task on someone else's behalf.



I'll try to find the exact method.



Jasmin

Avatar

Level 10
One API you can use is the reAssignTask () from TaskManager and reassign the task to you before you can complete it.



Jasmin

Avatar

Former Community Member
ah, thats disappointing. I got it working with the reAssignTask() tho, thx for all the help.