Skip to main content

How can I add a K2 Role in another K2 Role as a role item? it is possible according to the following statement copied from the document "K2 [blackpearl] roles and advanced destination rules":


WHAT MAKES UP A ROLE?
K2 roles are created in the Management Console of K2 Workspace. A new role is given a name and one or more role items. These items can be based on the following entities:
  Users or Groups from Active Directory or SQL
  Other K2 Roles
  Result from SmartObject Methods


Help on this please. Thanks.

K2 cannot have nested roles. I think you have outdated documentation. For the latest info, download the white paper from http://help.k2.com/en/AdvancedDestinations_Whitepaper.aspx



Is there a way to create K2 groups of AD users? The thing I want to achieve here is:


1) Create different user groups in K2 of AD users
2) Use these K2 groups in K2 Roles
3) Use K2 Roles in K2 processes.


"AD users > custom groups > custom roles" which is very common feature in almost every development tool e.g. SQL Server for assigning permissions. Does K2 has this feature?

I do not want to create these groups within AD iteself but in K2, as these groups will be used only within K2



Hi,


Normally K2 roles are the way you create "groups" in K2. You would create a role and add all the AD users into this role which you require. If I use your steps above I would edit them as follows:



  1. Create different roles in K2.
  2. Add the individual AD Users into these roles.
  3. Use the K2 Roles in K2 Processes.

If you do need ot create some sort of grouping you will need to use SmartObjects. Create a SmartObject which contains a "GroupName" and "UserName" property. Then add all the users into this SmartObject with the appropriate group name. In your K2 Role call the GetList method of this SmartObject and pass in a filter for the GroupName property. This will then return all the users defined for that "group". These users will then be part of your K2 Role.


I hope one of these approaches will help!


Regards,


Hi. thanks for your response, JohanL.

I think that by using Smart Objects for this porpose will not achieve the goal because smartobject holds data only at the run time in which case I would have to enter all the users one by one in this everytime. Or I would have to create the user groups in DB and run the SmO to get these groups from DB for every process instance.

Scenerio: I have 30 soccor players, grouped into 2 teams (15 players per team). These two teams are playing 3 matches against eachother. For each match, teams will remain the same but their individual players may be different. Now I want to create 6 team roles (3 matches * 2 teams). In each team role, I want to include one group and exclude 4 individual players from that group (to make a team of 11 players).

30 players = 30 AD Users (OK)
2 teams = 2 groups (???)
3 matches = 3 processes (OK)
6 team roles = 6 K2 roles
In each role, include one group and exclude 4 users from the same group (OK)

Would you please help me implementing this in K2? (Following your description above, I would have to add 11 individual users in each role which is not efficient)

thanks a lot


Reply