Need to create a document query

Hi All,

I need to create a document query which returns all documents with Processing statuses DONE and DONE W/ERRORS.
I’m using wm.tn.query:createDocumentQuery and pass the routing status as DONE along with the sender/receiver info, and then call wm.tn.query:DocumentQuery with the query created from the output of wm.tn.query:createDocumentQuery, which returns results Array as the output.
But i need to get the Documents with DONE and DONE W/ERRORS processing statuses at the same time.
Can someone help me on this?

ramesh.

Ramesh,

I believe 2 values can’t be set in the routing status,then you should use 2 createDocumentQueries for each statuses and extract the results based on the flags.

HTH,
RMG

RMG,

I need to loop over the results Array at once.
If i do it the way you have suggested,i think i have to loop twice over the results Array.but, that does’nt help.

ramesh.

As far i know this is work around,sorry if it doesn’t help.

HTH,
RMG

Ramesh:

Create a service that does this:

  • Query for DONE
  • Store results into temp var
  • Query for DONE W/ ERRORS
  • Append results to temp var (appendToDocumentList)
  • Return the temp var

Call the service from another and then you can loop over the returned var.

Ramesh,

Extract the documentQuery results for 2 statuses and append it to a doclist and this way you will get all the results in the one document and follow the rest as per your requirement.

Rob’s suggestion will also work as same.

HTH,
RMG