Showing results for 
Search instead for 
Did you mean: 

how to get all kind of GP work items for all users

Former Member
0 Kudos

Dear all:

Basing GP implementation,we can only get the single user's work item. Is that possible to get all of the users' work items,and can filter the work item via time field?

thanks a lot.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

ISearchResult result=UMFactory.getUserFactory().getUniqueIDs();

IUser iuser;





The above code retrives all the users from the UME

IGPUserContext context = GPContextFactory.getContextManager().createUserContext(iuser);

IGPWorkItem[] workitems = GPProcessFactory.getRuntimeManager().getWorkItems(GPWorkItemStatus.getTypeForCode("1"), context);

You will get the WorkListItems in the workitems array. The type for code which is 1 currently, must be changed according to the requirement. It is different for Completed, Inprogress Tasks, etc.

Hope this will help you!

Former Member
0 Kudos

no one knows it?please...