Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Process Manager (Stardust) » How to use user groups
How to use user groups [message #1705741] Tue, 18 August 2015 17:32 Go to next message
Tam Gom is currently offline Tam GomFriend
Messages: 36
Registered: July 2011
Member
Hi,

I am trying to understand the usage of user groups, so far unsuccessfully.

I would expect that users can be added to user groups and user groups can have grants, just as normal users, and when I add a user to a user group, the user automatically gets all grants transitively from the group.

Searching through the APIs, I haven't found any method to use user groups in a meaningful way. The UserService interface has the createUserGroup(...) and getUserGroup(...) methods, but the returned UserGroup object doesn't have a method for adding users to itself. Similarly the User interface has a getAllGroups() method but has no methods to assign user groups to itself.

All I have found in the documentation is that in the modelling workbench you can assign user groups to conditional performers but even this doesn't make any sense without being able to add actual users to user groups.

Is it possible to add grants to user groups the same way as you can add to users, and can users be added to user groups?

Thanks,
Tamás

PS: I'm using Stardust 3.0.0.

[Updated on: Wed, 19 August 2015 05:47]

Report message to a moderator

Re: How to use user groups [message #1705836 is a reply to message #1705741] Wed, 19 August 2015 12:16 Go to previous message
Ashish Khole is currently offline Ashish KholeFriend
Messages: 28
Registered: April 2015
Junior Member
Hi Tamás,

Here is the code to create a UserGroup and add the users to the UserGroup

private void createGroupAndAddCurrentUser(String GroupId, String[] usernames)
{
	ServiceFactory sf=ServiceFactoryLocator.get("motu","motu");
    UserGroup group = sf.getUserService().createUserGroup(GroupId, GroupId,GroupId + "_description", null, null);
    for (int i = 0; i < usernames.length; i++)
    {
		User user = sf.getWorkflowService().getUser(usernames[i]);
		user.joinGroup(group.getId());
        sf.getUserService().modifyUser(user);
    }
}


With the interface User, you can manage grants for participants. UserGroup does not have any grants, individual participants in the group will have their respective grants.

Regards
Ashish

[Updated on: Wed, 19 August 2015 12:16]

Report message to a moderator

Previous Topic:upgrade maven project 2 to 3
Next Topic:Swift Functionality
Goto Forum:
  


Current Time: Sun Sep 23 10:02:21 GMT 2018

Powered by FUDForum. Page generated in 0.02040 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top