Skip to main content

Hi guys, 

 

I have a simple question, when I run this query: 

Worklist oWli = k2Conn.OpenWorklist();

 

The worklistItems with WorkListStatus = 4 (completed) are not returned.

 

How can I return all WorklistItems? Or just the completed?

Cant find anything.

 

Thank you :)

Hi, johnz


 


Please see the link below from k2 developer reference on how to Returns a collection of worklist items for the current user.


 


Returns a collection of worklist items for the current user.


 


Kind Regards


 


Julia


Hi Julia, thanks for your reply.

 

But I need to call a rest service?

 

There is no method that return all worklistItems or only the completed ?

When I do a OpenWorkList all worklistitems are returned except the worklistitems with workliststatus = completed.

 

Seems strange....

 


I dont think completed workflows will be returned because its not a task that is active and assigned to the user. You would have to use the reporting smartobjects to get details of completed workflows. You can use the "Process Instance" smartobject to list all processes started by a particular user. This will reutrn all process that are active/completed/error. However as with the getworklistitem method of the api, the results that this smartobject returns does not mean that the process is currently assigned to that user. 


Hi, johnz


 


 SourceCode.Workflow.Client Namespace : WorklistStatus Enumeration will Returns the WorklistItem's status : Available, Open, Allocated, Sleep, Completed


 


Reference: WorklistStatus Enumeration


 


Kind Regards


 


Julia


Hi Johnz


 


I suggest that you install the K2 SmartForms Control Pack ( Download K2 SmartForms Control Pack ), after installing create a view and drag in the Activity Instances Grid to display all your instances that was created, completed, active, etc.


 


Kind Regards


Raymond


Reply