Skip to main content
Nintex Community Menu Bar

retrieve WorklistItem by it's SN via management API

  • August 10, 2009
  • 3 replies
  • 11 views

Forum|alt.badge.img+3

What is the straightforward way to retrieve a worklist item (EDIT) solely by it's serial number (/EDIT) when using the management API?

I've looked at WorklistCriteriaFilter but there is no way to filter over the worklistitem serial number

Thanks for your help

3 replies

Forum|alt.badge.img
  • August 11, 2009

The following can be found inthe K2 Documentation. It will iterate through all available items for a user and return properties for that item:


 foreach (WorklistItem worklistItem in connection.OpenWorklist())


                {


                    // open the worklist item


                    connection.OpenWorklistItem(worklistItem.SerialNumber);


 


                    if (worklistItem != null)


                    {


                        // retrieve properties of worklist item


                        Console.WriteLine("Process Instance Name: " + worklistItem.ProcessInstance.Name);


                        Console.WriteLine("Process Destination: " + worklistItem.ActivityInstanceDestination.Name);


                        Console.WriteLine("Process Folio: " + worklistItem.ProcessInstance.Folio);


                    }


                 }


 


        Console.WriteLine("End of worklist items.");


        Console.ReadLine();


 


You could of course open a worklist item directly if you have its serial number already.


Forum|alt.badge.img+8
  • August 11, 2009
Just for clarification, Markvj's example is using the SourceCode.Workflow.Client API.

Forum|alt.badge.img+6
  • August 18, 2009
jscott is right and it's actually not possible using Management API