Skip to main content
Sorry it may look like a dummy question but it is not working.
How can I get the serial number when opening a worklistitem instance in k2Rom
N.B: I need an other method then Request.QueryString("sn")

x = connection.OpenWorklistItem("? I need the serial", "ASP", True, True)
Although not ideal (for performance reasons), you could loop through all worklist items and look for some other matching information - like folio. When you've found the worklistitem with the correct folio, you can retrieve the serial number.

'Get Worklist for current Logged on User
oWorkList = oK2Connection.OpenWorklist("ASP")

For Each oWorkListItem In oWorkList
If oWorkListItem.ProcessInstance.Folio = strFolio Then
// Serial number given by: oWorkListItem.SerialNumber
End If
Next


I say again - from a performance perspective, this is NOT ideal since each worklist item is instantiated, the one after the other.

Failing this, the only other way would be to store the serial number somewhere for retrieval. You can for example, in the client event where the worklist item is created, store the process instance id and serial number for the specific ActivityInstanceDestination in an external database for later retrieval.

HTH,
Ockert

Reply