If you want to open a client event task (also known as a Worklist Item), update some data and/or complete the task, you will need to use the WorklistItem object. You can locate a WorklistItem in two ways: the first (more efficient) approach is to use the task’s serial number and call the OpenWorklistItem(serialNumber) method. This will return a WorklistItem object which you can then use to update and complete the user task. The alternative approach (not recommended due to performance) is to return the user’s worklist with WorkListCriteria, and then locate the specific task you are looking for by iterating over the worklist items.
The serial number for a task is normally appended to the Client Event URL as a query string parameter. When using the Client Event wizard in a workflow, you should see where K2 appends the serial number (SERIALNO) for the task to the Web Page URL:
The code snippet illustrates how to open, update, and then complete ("finish") a worklist item, assuming you have the Serial Number for the item.
This sample code requires references to the assemblies:
| 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
|
|||