Reputation: 1009
I'm working with GeneXus and I'm developing a business process diagram for GXFlow. I need that the user can select the owner of the next task. I can retrieve the list of the users of the specific role with this code:
&WorkflowServer.Connect('WFADMINISTRATOR','WFADMINISTRATOR')
&WorkflowOrganizationalModel = &WorkflowServer.GetOrganizationalModel()
&WorkflowFilter.Role = &WorkflowOrganizationalModel.GetRoleByName('RoleName')
&WorkflowUsers = &WorkflowOrganizationalModel.ListUsers(&WorkflowFilter)
//Adding users to a combobox
For &WorkflowUser in &WorkflowUsers
&users.AddItem( &WorkflowUser.Id.ToString(),&WorkflowUser.Name)
EndFor
In this case a user can select the owner of the next task from a combobox. How I can set the selected user as owner of the next task?
Upvotes: 0
Views: 201
Reputation: 1009
I found the best solution for my question. I hope it can be useful also for you:
You can save the selected user in a relevant data variable. In the target task properties you can change the property "Assign from a user in a relevant data" and assign the previous created variable to it.
This works good for me.
Upvotes: 1
Reputation: 101
You can use the "Is Ad-Hoc" property for a task and GXflow will do this automatically for you. Please see this documentation for more details about this option https://wiki.genexus.com/commwiki/servlet/wiki?11875,Is+Ad-Hoc+Property
Upvotes: 0