Skip to Content
0
Former Member
Mar 24, 2009 at 09:22 AM

UWL API to get number of task items

26 Views

Hi All

I am trying to get the number of new tasks and total tasks available in the UWL iview for users using UWL api.

I tried using the below code:

IUWLService uwlService = (IUWLService) PortalRuntime.getRuntimeResources().getService(IUWLService.ALIAS_KEY);

UWLContext uwlContext = new UWLContext();

IUser user = request.getUser();

uwlContext.setUser(user);

uwlService.beginSession(uwlContext,60);

IUWLItemManager itemManager = uwlService.getItemManager(uwlContext);

QueryResult result = itemManager.getItems(uwlContext,null,null);

int size = result.getTotalNumberOfItems();

This total number of items returned using thew API is not the one which is displayed in the UWL iview.

I tried to use IActionInboxService API. I added jar file km.appl.service.actioninbox_api.jar to classpath. Still I am not able to use this interface in my NWDS.

Any clue what I have missed. Any idea to get number of new items and total items in UWL iview using UWL API.

Regards,

Yoga