Skip to main content

I need to be able to search all available work items for items assigned to a particular user or group.  I can't find a way to do this in either the Workflow.Client or Workflow.Management namespaces.  The functionality exists in the Management Console in the K2 Workspace, so I assume it's buried somewhere in the API.


 


Could anyone point me in the right direction?


 


Thanks,


Jason

you can use the GetWorklistItems of the Workflow.Management API.


You will find a sample on the documentation (you can search the sample using the following text: "Global Worklist").


HTH


I saw mention of the Global Worklist in the Developer Reference, however, the only thing that section says is:


 


"The Worklist sample
code is written for use with Web based forms. Sample code for Windows based
forms will be available in a future release of the Developer's Reference"


 


I also looked at the GetWorklistItems method but cannot figure out how to filter on Destination


Got it:


 



            var wfMgr = new WorkflowManagementServer();


            wfMgr.Open(connectionStringBuilder.ConnectionString);


            var criteria = new SourceCode.Workflow.Management.Criteria.WorklistCriteriaFilter();


            criteria.AddRegularFilter(WorklistFields.Destination,SourceCode.Workflow.Management.Criteria.Comparison.Like, "%user_name%");


 


            var processes = wfMgr.GetWorklistItems(criteria);




Reply