cancel
Showing results for 
Search instead for 
Did you mean: 

UWLException: (Default) Logged in users context or session doesn't exist

Former Member
0 Kudos

Hi, comrades!

I need to get all UWL items using WebDynpro technology for all users.

I used the code below this link [How to use UWL API for NetWeaver BPM Tasks|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/16356] [original link is broken] [original link is broken] [original link is broken];.

When I try to get Items for portal users, which I get by

IUser loggedinuser = UMFactory.getUserFactory().getUserByLogonID("xxx"), I get UWLException: (Default) Logged in users context or session doesn't exist.

A few years ago the tread with the same problem was started (link = [UWLException: (Default) Logged in users context or session doesn't exist|;

Now the status of this thread is "answered", but there were not any solution for WebDynpro applications.

Does anybody know any solution for this problem?

Big thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Qualiture
Active Contributor
0 Kudos

Hi,

I now see you are trying to retrieve the UWL items for all users. I'm not sure if this is possible at all due to security constraints. If I'm correct, you could only retrieve the items for the currently logged in user

lvhengel
Participant
0 Kudos

It's not possible to retrieve the tasks for other users. Only a logged-in user is able to retrieve his own tasks for security reasons. I tried it myself last year, but didn't succeed either

I checked the difference of the IUser object in the debugger and you see a clear difference between the two objects.

The Authenticated IUser object holds more data which is apparently checked when retrieving the UWL tasks. See IUser objects below.

IUser user = UMFactory.getAuthenticator().getLoggedInUser();

==================================================

Message buffer:

No messages available.Transient data:

***************************************************************************

  • com.sap.security.core.persistence.imp.PrincipalDatabag

  • UniqueID: USER.PRIVATE_DATASOURCE.un:purchaser

  • Type: USER

  • Home data source: PRIVATE_DATASOURCE

  • Private id part: un:purchaser

*

  • Existence not checked.

*

  • "com.sap.security.core.usermanagement"|->"j_authscheme" (no time limit)="default"

  • "com.sap.security.core.usermanagement"|->"MYSAPSSO2_STRING" (no time limit)="AjExMDAgABBwb3J0YWw6cHVyY2hhc2VyiAAHZGVmYXVsdAEACVBV... (total length: 476 characters)"

***************************************************************************

Persistent data:

***************************************************************************

  • com.sap.security.core.persistence.imp.PrincipalDatabag

  • UniqueID: USER.PRIVATE_DATASOURCE.un:purchaser

  • Type: USER

  • Home data source: PRIVATE_DATASOURCE

  • Private id part: un:purchaser

*

  • Principal exists.

*

  • Direct parents:

  • ROLE: ROLE.PCD_ROLE_PERSISTENCE.ZgS0OyjdkcgJaSs1b0qAUlTvLnk=

  • ROLE.PCD_ROLE_PERSISTENCE.vxLw9pkgokO0P5vLuimS6ZquOgM=

  • GRUP: GRUP.SUPER_GROUPS_DATASOURCE.AUTHENTICATED_USERS

  • GRUP.SUPER_GROUPS_DATASOURCE.EVERYONE

  • "com.sap.tc.webdynpro"|->"debugParameters" (no time limit)=

  • "com.sap.ur"|->"ImprovePerformance" (no time limit)=

  • "$serviceUser$"|->"SERVICEUSER_ATTRIBUTE" (no time limit)=

  • "com.sap.portal.dsm"|->"DebugControlFlag" (no time limit)=

  • "com.sap.portal.aidebug"|->"AppIntegratorDebugMode" (no time limit)=

  • "PrimaryHelpNS"|->"PrimaryHelpFlag" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"timezone" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"accessibilitylevel" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"email" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"locale" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"lastname" (no time limit)="Pure"

  • "com.sap.security.core.usermanagement"|->"firstname" (no time limit)="Peter"

  • "com.sap.security.core.usermanagement"|->"uniquename" (no time limit)="purchaser"

  • "com.sap.security.core.usermanagement"|->"salutation" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"displayname" (no time limit)=

  • "com.sapportals.portal.navigation"|->"uipmode" (no time limit)=

***************************************************************************

and

IUser user = UMFactory.getUserFactory().getUserByLogonID("xxx");

====================================================================

Message buffer:

No messages available.Transient data:

No transient data set.

Persistent data:

***************************************************************************

  • com.sap.security.core.persistence.imp.PrincipalDatabag

  • UniqueID: USER.PRIVATE_DATASOURCE.un:manager

  • Type: USER

  • Home data source: PRIVATE_DATASOURCE

  • Private id part: un:manager

*

  • Principal exists.

*

  • "com.sap.portal.dsm"|->"DebugControlFlag" (no time limit)=

  • "$serviceUser$"|->"SERVICEUSER_ATTRIBUTE" (no time limit)=

  • "com.sap.portal.aidebug"|->"AppIntegratorDebugMode" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"timezone" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"accessibilitylevel" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"email" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"locale" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"lastname" (no time limit)="Meier"

  • "com.sap.security.core.usermanagement"|->"firstname" (no time limit)="Michael"

  • "com.sap.security.core.usermanagement"|->"uniquename" (no time limit)="manager"

  • "com.sap.security.core.usermanagement"|->"salutation" (no time limit)=

  • "com.sap.security.core.usermanagement"|->"displayname" (no time limit)=

  • "PrimaryHelpNS"|->"PrimaryHelpFlag" (no time limit)=

  • "com.sapportals.portal.navigation"|->"uipmode" (no time limit)=

Former Member
0 Kudos

That's bad...

Thank you for your answers.

Regards, Sergey Matveev.

Former Member
0 Kudos

Hi Leo van Hengel,

Thanks for the insightful answer, however I was curious to know, if an administration UI needs to be build on top of UWL api is it possible to retrieve all the task for a particular user. Does it needs to be administrated from the source system instead of UWL ??

Thanks & Regards

Jeetendra Choudhary

lvhengel
Participant
0 Kudos

Hi Jeetendra,

Unfortunately this is not possible with the UWL API as described above. The UWL API can only retrieve items for the logged in user.

Yes, I think you have to build something in the source system (ABAP?) do to this. For example create Gateway Services and build a UI with SAPUI5 🙂

Regards,

Leo

Answers (1)

Answers (1)

Qualiture
Active Contributor
0 Kudos

Try to set the WD app's sap.authentication property to 'true' and see if it works

Former Member
0 Kudos

Thanks for your answer, Robin, but I have already set this parameter to true.

Regards, SM.