Fast way to retrieve worklist count without returning list

  • 19 December 2005
  • 1 reply
  • 1 view

Badge
I need a fast, efficient way to retireve the number of worklist items for a user. OpenWorkList requires me to download all of the data just to get a count. Is there any equivalent to a sql server select count(*)? I am currently using K2ROM.OpenWorklist(criteria) and then returning worklist.count. The performance is unacceptable in a distributed environment with potentially thousands of items.

Thanks for any suggestions.

1 reply

Badge +11
Not sure how much of a performance improvement it will be but you can also use the K2Mng object model. Specifically the K2Manager.GetWorklistItems call to get back a collection of worklist items for a specific user. The user making the call to K2Mng will need Administration rights on K2.net Server.

Hope this helps,
Ockert

Reply