The ProcessDefinitionAssociationsFilterData
will give you a list of the actual workflow process definitions, do the items in workflow. You probably need the UserWorkItemsFilterData
class.
Take a look at the code in this project
https://code.google.com/p/tridion-notification-framework/source/browse/NotificationService/NotificationService/Worker.cs
You want something like this
var userWorkItemsFilter = new UserWorkItemsFilterData()
{
ActivityState = ActivityState.Started | ActivityState.Assigned,
};
var workItemDataList = new List<WorkItemData>();
client.GetSystemWideList(userWorkItemsFilter).ToList().ForEach(idObject => workItemDataList.Add(idObject as WorkItemData));
return workItemDataList.ToArray();
I think if you query this as an admin, you can get all work items rather than a specific user's work items.