Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

NW CE 7.2 - UWLException (Default) Logged in users context or session

Hi Everyone,

We are trying to get the task Items of a user from a custom webdynpro application, but while calling the itemManager.getItems(uwlContext, null, null) method... Web Dynpro application's sap.authentication setting is set to true and it do requires user logon.

One funny thing is, if we deploy&run the application from NWDS, logon using the provided screen we get the exception. But if we re-deploy&run the application from NWDS not closing the previews application tab on IE, it do work and give us the task Items of the user...

Thanks for your time and answers.

Best Regards,


try {
	// lookup UWL service
	IUWLService uwlService = (IUWLService) WDPortalUtils

	// create UWL context
	UWLContext uwlContext = new UWLContext();
	// find logged in user.
	user = WDClientUser.getCurrentUser().getSAPUser();
	Locale locale = Locale.getDefault();
	if (user.getLocale() != null){
		locale = user.getLocale(); 
	// begin session
	IUWLSession uwlSession;
	uwlSession = uwlService.beginSession(uwlContext, sessionIdleTimeout);

	// iterate over all UWL items
	IUWLItemManager itemManager = uwlService.getItemManager(uwlContext);
	QueryResult result = itemManager.getItems(uwlContext, null, null);
	ItemCollection items = result.getItems();
	Item item = null;

	String foundItems = Integer.toString(items.size());

	for (int i = 0; i < items.size(); i++) {
		item = items.get(i);
		description = item.getDescription();

		executionURL = WDURLGenerator.getApplicationURL(
		                      BPM_TASK_COMP_NAME, BPM_TASK_PART_NAME, item
		if (executionURL != null) {
			messageString("Execution URL: ", executionURL));
	// end session
} catch (UWLException e) {

Former Member
Not what you were looking for? View more on this topic or Ask a question