Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Process Manager (Stardust) » How to add user to Runtime Participant role
icon3.gif  How to add user to Runtime Participant role [message #1629082] Sun, 22 February 2015 13:09 Go to next message
kayvan jam is currently offline kayvan jamFriend
Messages: 39
Registered: February 2015
Member
Hi All.
In embedded usage i add a user with createUser(...) method furthermore i have a model with a role such as User, how to add that user to this role in runtime mod?
thanks all.
Re: How to add user to Runtime Participant role [message #1629618 is a reply to message #1629082] Sun, 22 February 2015 20:16 Go to previous messageGo to next message
Andreas Mueller is currently offline Andreas MuellerFriend
Messages: 12
Registered: October 2011
Junior Member
Hi,

The method addGrant(ModelParticipantInfo participant) on a User object allows to add grants for the given participant being added for all model versions. Note that the grant will not be actually given until the method UserService.modifyUser(user) is invoked. Please refer to the section UserService of the chapter Stardust Services for information on this service and the according Javadoc of the UserService for detailed information on the modifyUser method.

Regards,

Andreas
Re: How to add user to Runtime Participant role [message #1630674 is a reply to message #1629618] Mon, 23 February 2015 10:21 Go to previous messageGo to next message
kayvan jam is currently offline kayvan jamFriend
Messages: 39
Registered: February 2015
Member
Hi,
how to assign that role to ModelParticipantInfo ?
Re: How to add user to Runtime Participant role [message #1632348 is a reply to message #1630674] Tue, 24 February 2015 08:08 Go to previous messageGo to next message
kayvan jam is currently offline kayvan jamFriend
Messages: 39
Registered: February 2015
Member
exist any example that shows a role to ModelParticipantInfo through programmatically?
please guide me.
thanks all.
Re: How to add user to Runtime Participant role [message #1638873 is a reply to message #1632348] Fri, 27 February 2015 10:37 Go to previous messageGo to next message
kayvan jam is currently offline kayvan jamFriend
Messages: 39
Registered: February 2015
Member
this is urgent problem ... everybody can help me please?
Re: How to add user to Runtime Participant role [message #1638959 is a reply to message #1638873] Fri, 27 February 2015 11:34 Go to previous messageGo to next message
Simone Seurer is currently offline Simone SeurerFriend
Messages: 10
Registered: June 2013
Junior Member
Hi,

here is a small example code:
//Get factories
ServiceFactory factory = ServiceFactoryLocator.get(...);
QueryService qs = factory.getQueryService();
UserService us = factory.getUserService();
//Create User				
User user = us.createUser(...);
//Get participant
ModelParticipantInfo participant = (ModelParticipantInfo) qs.getParticipant("MyRole");
//Add grant
user.addGrant(participant);
//modify user
us.modifyUser(user);


hope that helps.

Simone
Re: How to add user to Runtime Participant role [message #1643482 is a reply to message #1638959] Sun, 01 March 2015 15:51 Go to previous message
kayvan jam is currently offline kayvan jamFriend
Messages: 39
Registered: February 2015
Member
Dear Simone,
i so appreciate , that works
Previous Topic:unexpected work list query result
Next Topic:urgent problem with state of manual activity
Goto Forum:
  


Current Time: Thu Sep 20 22:25:11 GMT 2018

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

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

Back to the top