cancel
Showing results for 
Search instead for 
Did you mean: 

Getting UWL task count for all users in a role.

david_palafox
Explorer
0 Kudos

Hi.

I recently posted a question regarding a very similar issue, but I haven't got any response yet. I think my question might have been somewhat poorly phrased, so I will try to do better at explaining what we need.

We have a number of processes, most of which need to be dynamically assigned to a user when created. The way we want to assign those tasks is by executing a WebService which would receive a role name and get all the users for that role. Then, using the UWL API, it would check how many tasks each of the users have in their UWL, and return the UserID for whoever has the least tasks. I haven't been able to get this to work. I keep getting Logged in users context or session doesn't exist Exception.

Please, any help on this will be greatly appreciated.

Currently working with SAP NWDS 7.1 SP05 PAT0005

Accepted Solutions (0)

Answers (2)

Answers (2)

david_palafox
Explorer
0 Kudos

Haven't yet got the a definitive answer, but I'm closing the thread.

srinivas_sistu
Active Contributor
0 Kudos

Hi,

have a look at this below link, it shows how to get users aggigned to a particular role.

in section 3.3

http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=16442

Regards,

SrinivaS

david_palafox
Explorer
0 Kudos

Hi,

Thank you for your response, however, that's not what I need.

For you and anyone esle who might find this extra info useful...

  • I know how to get a user's role(s), and how to get the users in a role.

  • I also know how to assign a task to a specific user dynamically.

  • Using the UWL API, I know how to get the tasks (or items) in a user's UWL from a WD application, I need to do that from a WebService and using pretty much the same code, with the necessary adjustments, I can't get it to work.

  • Furthermore, I'm able to get the UWL tasks for ONE user, that user being the one I log into the application with. For example, if I write code to get the tasks for user testUser1, I need to log in with testUser1 to get it to work, if I log in with any different user or make it a non-authenticated application, it won't work.

Again, help on this is much needed and will be appreciated.

lvhengel
Participant
0 Kudos

Hi David,

I had the same problem with calling the UWL API from a Web Service. I have tried the solutions mentioned in [this thread|; but i still got the exception "(Default) Logged in users context or session doesn't exist"

What worked for my was downloading the lastest version of the UWLJWF sca from http://service.sap.com and install this on the server. You can also import into the sca into your NWDS. Apparently this problem is fixed in a newer version but i could find documentation about it.

One note: I am using NetWeaver CE 7.2, but maybe for CE 7.1 a newer version of UWLJWF also helps.

Regards,

Leo

david_palafox
Explorer
0 Kudos

Hi Leo, thanks for your response.

I checked and we do have the latest UWL API, and still can't get it to work... that makes me think that it can't be done with 7.1 or I'm doing something wrong (I don't know which would be better at this point). However, if u got some sample code you could share, that'd be great, just a little summary in case u'd like to contribute...

Web service method is supposed to receive a role name (or role ID, whatever) as a parameter, and get the user in that role with the least items in their UWL...

Thanks...

david_palafox
Explorer
0 Kudos

Here's a little something for whoever is willing to help on this... I just got it to work halfway... i was able to get the task count for ONE user in the webservice.... problem now is that i need to parametrize the web service with username and password to get that one user's task count. therefore, if I want to get the count for other users, i might need to authenticate as well, which, as far as i know, cannot be done programmatically, so any ideas are welcome...