Skip to main content
Nintex Community Menu Bar

Getting all open worklistitems for a process [regardless of who assigned to]

  • October 26, 2007
  • 7 replies
  • 10 views

Forum|alt.badge.img+1

What is the best way to go about getting all 'open' worklistitems for all users associated with a process? Has anyone done this using SourceCode.Workflow.Management or a smart object? Ideas / suggestions greatly appreciated.


TIA,


Curtis

7 replies

Forum|alt.badge.img+5
  • October 29, 2007

Hi Curtis,


I would recommend you use the "WorkflowManagementServer" class of "SourceCode.Workflow.Management". There is a method with a couple of overloads called "GetWorkListItems" which you can use to retrieve worklistitems of users. E.g.


            WorkflowManagementServer wms = new WorkflowManagementServer("localhost", 5555);
            wms.Open();
            WorklistItems wli = wms.GetWorklistItems(new DateTime(1900, 01, 01), DateTime.Now, "K2:K2DEMOBpservice", "k2smartobjectproject1process2","", "", "");


Note that you need to have the Admin Server Right to be able to do this.


HTH


Gert


Forum|alt.badge.img+7
  • October 29, 2007
We have to write our own webpart for this propose?

Forum|alt.badge.img+1
  • Author
  • October 29, 2007
Thanks Gert for the quick reply!

Forum|alt.badge.img+5
  • November 12, 2007

Hi kenlin,


Can you explain the web part how to do?


I have to do the same.


 tkx


Forum|alt.badge.img+5
  • November 12, 2007

Is there some sort of reference guide for SourceCode.Workflow.Management available ?


And any idea where I can find the "Delegate" methods as seen in the tasklist in the BlackPearl Workspace ?


Thanks,


Nicolas


Forum|alt.badge.img+7
  • November 12, 2007

Gert,
Well, I tried, thx. From your code, I pass empty string in the Destination input parameter and get all "Open" or "Available" Processes.


Ys_chang,
All I have done is reference "SourceCode.Workflow.Management" and "SourceCode.HostClientAPI"(don't know why it need when I execute it). Then I do the following Code,



Using SourceCode.Workflow.Management
...
...
WorkflowManagementServer wms = new WorkflowManagementServer("BLACKPEARL", 5555);
wms.Open();
WorklistItems oWorkListItems = wms.GetWorklistItems(new DateTime(2000, 01, 01), DateTime.Now, "", "Denallix Process TutorialExpenseClaim", "", "", "");

foreach (WorklistItem oWorkListItem in oWorkListItems)
{
      //Do your own coding to get the data
      ...
      ...
}


Forum|alt.badge.img+5
  • November 12, 2007
Thanks kenlin to reply