<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Task for every user with a specific Role (dynamically)</title><link>https://answers.axonivy.com/questions/1621/task-for-every-user-with-a-specific-role-dynamically</link><description>&lt;p&gt;Is it possible to create a task which has to be completed by every user of a specific role, which should be determined dynamically? I.e. if I have three users which own a role, all three users have to complete this task. The more convinient way would be, if all three get an own task in ther "Personal Task List".&lt;/p&gt;
&lt;p&gt;Thanks in advance for any answers.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1621/task-for-every-user-with-a-specific-role-dynamically" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 08 Jan 2016 15:01:07 -0500</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/1621/task-for-every-user-with-a-specific-role-dynamically/1624</link><description>&lt;p&gt;You can query the users of a role with the following public API:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ivy.wf.getSecurityContext().findRole("Everybody").getAllUsers();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then you can draw a process that loops over a task switch and creates new user tasks until all users have one. 
The second task is a system task which continuous the execution until the list of users is empty.&lt;/p&gt;
&lt;p&gt;&lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/createTaskForEachUser.png"&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Fri, 08 Jan 2016 15:01:07 -0500</pubDate><guid>https://answers.axonivy.com/questions/1621/task-for-every-user-with-a-specific-role-dynamically/1624</guid></item></channel></rss>