Actor filter that returns a list of user

1
0
-1

Hello,

In the workflow I'm working on, there's a task that has a form which contains a reassign feature wherein the taskdoer can reassign the current task to another user.

My question is, how do I make it so that in the actor filter, there's an if condition where if the task is reassigned to another user, it will be automatically assigned to the chosen user, else if it's not reassigned, the task will be available for a group of users to take.

There's a actor filter shared to this community which returns a list of users but, I was not able to make it work.

I would appreciate your help. Thank you!

Comments

Submitted by romain.bioteau on Fri, 06/26/2020 - 10:16

Hi,

If I understand properly, you have a form with an action (bound to a button I guess) that call Bonita REST API to assign the task to someone else ?

Is it ok for your use case that 'everyone' can reassign the task and not only the manager ?

The re-assign feature should be implemented outside a process form ihmo. This is more something that should be done in a living app or using the portal otherwise you will have to implement it for each task where you need the feature.

Are you using a living app above your processes form ? Or using the portal ?

Submitted by rosario.latagan... on Fri, 06/26/2020 - 15:38

Ahh yes. I am planning to use a living app ( Using the bonita process/case/task list that's available in the Resources tab) . But my plan is to have the reassign button on specific tasks ( tasks of managers ) in the workflow process.

My plan was to just loop the task back to itself once the Reassign button is submitted, but this time, the task will now be assigned to the chosen user.

For the list of manager, I'm planning to use the getUsersOfARole method however, that only works in groovy, I'm still not sure how to do it in the ui designer, since I don't know a way to import a process variable to the form.

Submitted by romain.bioteau on Sat, 06/27/2020 - 09:17

So there is a task in the workflow that will be available for managers only called "reassign" that will have an infinite loop. With this task, a manager can re assign other tasks from the current case. Do I understand it properly ?

Submitted by rosario.latagan... on Sat, 06/27/2020 - 20:53

Yes you are right. To be more specific, there are multiple steps in the process that has the reassign button. However aside from the reassign button in the task, there's also submit button that will make the user proceed to the next step. This means the manager can either submit the task ( to proceed to the next step ) or reassign the task ( proceed to the same task but with a different user this time ).

Submitted by romain.bioteau on Sun, 06/28/2020 - 10:15

I don't think it's the best way to implement this behavior. You are mixing your process logic with a process management task. If reassignment must be tracked in the process then it should have its own dedicated task.

I struggle to picture what you are expecting when clicking on reassign as a manager as you are not executing the task in this case so having a loop on it the doesn't make sense.

I'll try to design a small example of how I think this use case can be solved as it seems to be a pretty interesting and common need.

1 answer

1
+1
-1
This one is the BEST answer!

I have just publish an example that illustrate how an assign task can be implemented with Bonita inside a workflow.

HTH

Romain

Comments

Submitted by rosario.latagan... on Wed, 07/01/2020 - 02:03

Thank you sir, I will check it out.

Notifications