Querying Network Trading console

Hello, I am new to webmethods and I have a hopefully easy question:

I need to query the Network Trading Console for specific error messages that might have occurred during message processing. I’ll need to return several bits of information such as document ID, receiver, sender. I found the documentation on the Trading Networks and it appears that I would use Wm.tn.query:documentQuery. If I am on the right path then please advise. Also, anyone know where I can find some examples of these queries. In other words I want to be able to perform a query from a service/flow; of the Trading Network in much the same way as the Trading Networks Console. Thank you

You are on the right path with using Wm.tn.query:documentQuery. In order to use that service you first need to create the actual query that you wish to run using the following service: Wm.tn.query:createdocumentQuery
You first use this service in order to specify the parameters of the query you wish to run. The output of this service will be a query object that you will then map into the Wm.tn.query:documentQuery service. Wm.tn.query:documentQuery will then based on the query you defined return a result set if any documents matched your query.


Please check this thread below which elaborately specified about how to use the above mentioned services with correct inputs.



RMG: Yes I read that thread a while back. Let me describe what I want to do in the form of an SQL query:

SELECT * FROM <tradingnetwork> WHERE UserStatus = ‘OUT-OF-SYNCH’

That is very simple, however I do not have any documentID, messageType etc… I just want to simply return a result set based on UserStatus column’s value.


Just you need to set UserStatus=‘OUT-OF-SYNCH’,timeInterval=ANYTIME in the createDocumentQuery service and select option disablePaging=true in the documenQuery service.This gives the results as expected.