cancel
Showing results for 
Search instead for 
Did you mean: 

Thick client Api, how to find document workflow queue location?( error code -81 when the document is in the queue I'm searching).

Jose_Galdamez
Confirmed Champ
Confirmed Champ

I'm currently using the following operations:

mzwfGetUserQueues  //this to get the lifecycle queues where I want to search

and mzwfGetWorkDocumentsByQueue //to see if the document is within the queues

When I search a Queue and the document is not found, I get error code -72 "Document Not Found in Queue," which is expected.

But when the document is in the queue I get error -81 "Invalid Folder Type," which is unexpected.

code= g_Onbase.mzwfGetWorkDocumentsByQueue(g_SessionHandle, queue.ID, docID, Constants.MZ_FIRST, out docName);

if (code> 0 || code == -81)
{
outputMsg("code:  " + code+ ",  the document is in queue :" + queue.Name);
break;
}

any ideas?

1 REPLY 1

Ryan_Wilson1
Employee
Employee

Hi Roland,

The mzwfGetWorkDocumentsByQueue method assumes you have a Work Folder set up for the queue.  As per the SDK:

"This method will retrieve documents currently within the Work Folder of a Life Cycle Queue. If no Folder Type is defined for the Queue or Life Cycle, "OBAPI_E_INVALID_FOLDER_TYPE (-81)" will be returned"

If you just want to get all the documents in a queue, look at using the mzwfGetUserDocumentsByQueue method.