cancel
Showing results for 
Search instead for 
Did you mean: 

Find the Existence of a Document in a Load Balanced Queue

James_Yang1
Champ on-the-rise
Champ on-the-rise

Hi,

How to find if a document exists in a particulare queue of a workflow?

I am trying to use the below functions:


// find the documents in the workflow

Workflow workflow = app.Workflow;

LifeCycleList lifeCycles = workflow.LifeCycles;

LifeCycle lifeCycle = lifeCycles.Find(OVERDRAFT_WORKFLOW);

Queue queueBranchReview = lifeCycle.Queues.Find(BRANCH_REVIEW);

 

QueueQueryOptions opt1 = queueBranchReview.CreateQueueQueryOptions();

opt1.Filter = documentQuery;

DocumentRetrievalOptions rOpt1 = DocumentRetrievalOptions.LoadKeywords;

if (queueBranchReview != null)

{

DocumentList docs = queueBranchReview.GetDocumentList(opt1, MAX_DOCUMENTS, rOpt1);

if (docs != null && docs.Count > 0)

foreach(Document d in docs)

{

docList.Add(d);

}

}

 

I am trying to retireve a document list from a load balanced queue. When the documents are assigned to other users, the returned document list would be empty.

Is there a way for me to find out if a specific document exists in a load balanced queue?

 

1 REPLY 1

James_Yang1
Champ on-the-rise
Champ on-the-rise

I've figured it out. Applying the following code resolves the problem.

opt1.ListType = QueueQueryListType.AllDocuments;