|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Retrieving user and roles lists |
« View previous topic :: View next topic » |
Author |
Message
|
david_sorrento |
Posted: Tue Nov 12, 2002 9:03 am Post subject: Retrieving user and roles lists |
|
|
Newbie
Joined: 12 Nov 2002 Posts: 8 Location: Dublin, Ireland
|
Hi,
My second post today
Apologies if this has been asked before, I'm looking for opinions for best approach or knowledge of how it was tackled before by anyone.
Briefly I am using the MQWF webclient for my application. I have two types of user 'Team Leader' and 'Team Member'. These are implemented in buildtime by defining a role. The team leader I make the coordinator of a role, the team members I make members of that role.
Just to set the scene then... the first step in the process is that a team leader opens an item and must assign it to one of his/her team members, this is done through a drop down list. When assigned, the team member then sees the item in their worklist.
So my question is.....
What is the best way to retrieve a list of users to display for the team leader to choose from? Now I know there is an API for accessing user info but it presumes you already have the userid. I want to retrieve a list of users that belong to a role. Would it bne considered better to:
1. Go directly to the MQWF tables in DB2 and dig out a user list - I don't really fancy doing this as the innards and workings of the DB are an unknown.
2. Maintain a list of users and roles in my application database and retrive from that. It then becomes a DBA/Administrative task to make sure my App DB and WF Runtime user lists are in synch.
Any thoughts or comments are appreciated
thanks,
David |
|
Back to top |
|
 |
Ratan |
Posted: Tue Nov 12, 2002 9:47 am Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
You can retrieve all the users assigned to a workitem, with the help of API call workItem.staff(). This you can use to populate your drop down box with user list. For the next activity, model it to be on the worklist of people from the container and set the _Activity_Info.people with the user you selected. I hope you know how to map the data members and stuff.
Basically we are talking about 2 activities, first one assigned to a role, so that all the members of role have access to it, retrieve the assigned staff ( Use API to do this), select the person you want to assign to and update the _Activity_Info.people of the output container of the activity. Then map this to the input container of the next activity, this activity should use the 'people from container'.
Never tried this, but believe it should work.
-Laze
Last edited by Ratan on Tue Nov 12, 2002 10:23 am; edited 1 time in total |
|
Back to top |
|
 |
jmac |
Posted: Tue Nov 12, 2002 9:48 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
David:
I would never go to the tables directly. You risk IBM not supporting you if you do.
If I understand you correctly, this should not be too big a problem. Your Team Leaders, must be able to transfer the workitems to the members of their team. So, I am guessing that you have set each TeamLeaders userid to have access to the workitems of the Team members. If this is the case, when the team leader is running the first activity, they will have access to their own person object, and there is a method personsAuthorizedFor() which returns an String array of the userids. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
david_sorrento |
Posted: Tue Nov 12, 2002 10:12 am Post subject: |
|
|
Newbie
Joined: 12 Nov 2002 Posts: 8 Location: Dublin, Ireland
|
thanks guys.
John the PersonsAuthorizedFor will sort me out with a list of team members for whom I might assign the workitem to (i.e. for whom the next step in the process will go to). Now to my next little conundrum....
A team member opens the item (that has just been assigned to them by the team leader above). I have to allow for the fact that a team member decides that the particular piece of work is not for them. They have a 'Refer work' option, basically they can select a person in their team to transfer the item to. Now I've implemented this using the Transfer function and have it working - but I'm using a hard coded list of users for them to select from....
My problem is now then, how do I retrieve a list of people who have the same role as me - given that I am not authorised over them, we merely share the same role. I see that I can get my team leader using PersonsAuthorizedForMe() but how would I get my fellow team members list?
oh and I hear you on the not accessing MQWF tables directly.... that could be a whole world of pain !!
thanks again,
David |
|
Back to top |
|
 |
jmac |
Posted: Tue Nov 12, 2002 11:23 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
BUMMER... you can't get the members of a Role via an API call. That means you need to either access the table directly or maintain a separate table of your own... of course if you already have LDAP setup this might not be difficult. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|