9

I want to fetch all the items which are in workflow using core service (.Net).

Browsing through the core service documentation suggested that ProcessDefinitionAssociationsFilterData class would solve the problem. Please let me know if my understanding is correct. Please provide pointers.

1 Answer 1

8

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.