How to change the user role for a user task in workflow by Admin from UI?

0
How to change the user role for a user task in workflow by application admin from the application UI? We need to change the target users and the allowed role from application UI [not studio pro or studio]. We have already assigned user tasks to a group of users using target user concept by microflow and X-path. But our current requirement is to change the target user list for the workflow user task by an application user, and the change is to be reflected for all up coming user tasks of the effected workflow. We have already explored the idea of assign/re-assign to user for a particular user task. However that did not satisfy our requirement. We need to change for all up coming and existing in progress user tasks target users and allowed roles. Is it possible in Mendix? Please guide.
asked
1 answers
1

The Xpath to set the user role of the target users is only evaluated when the task is created.

If you want to have the role changed in all cases, change it in the model.

If you want to change the targeted users in the app, this can be done by retrieving the list of users in a microflow and assigning them to the association WorkflowUserTask_TargetUsers

Something like this:

 

If you would like to make it more dynamic, you could created a page, where the user selects the userrole and pass the selected userrole into this microflow and user that as constraint in the retrieve activity. 

Another option would be that you step away from user roles, and start thinking in Users. Create a page where you can select a set of users (of any role) and pass the selected list of users in the microflw and set these users as target users.

answered