Actor filter that returns a list of user

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!

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

HTH

Romain

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 ?

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. 

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 ?

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 ). 

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.

Thank you sir, I will check it out.