It is quite possible that a user may have hundreds or even thousands of tasks on their worklist and you want to limit the number of tasks returned, or you may want to locate tasks based on a specific set of search criteria. To limit the number of worklist items returned by the OpenWorklist method, you can instantiate and set up a WorklistCriteria object to build up a combination of filter and/or sorting statements, and then pass this object to the Openworklist() method.
The code snippet below shows how to retrieve a user’s worklist with a simple example of a worklist criteria object where we want to retrieve all workflows where the Folder name is MyFolder, the process Priority is 1 and we want to return the worklist sorted by the Process start date, descending. The code then loops through each worklist item and reads some data about the item.
This sample code requires references to the assemblies:
Using the NoData and Platform parameters in worklist criteria can help to reduce the amoutn of time taken to retrieve a worklist. Note that when you use the NoData flag, no data field values will be returned with the OpenWorklist call.
| Video | Links | Learn | Support |
|
No videos found for this article K2 on YouTube
No Additional links found for this article
No self-learning content for this article Try some scenarios...
No relevant support links available for this article
|
|||