Wait and Notify questions

Hello to all, I’m a newbie at the webMethods platform only with prior experience in Biztalk, and since I’ve started working with wM I have been visit this forum daily. So let me first thank everyone who gives support here (ey it’s my first post :slight_smile: ).

Now to my real question, I’m having some issues while using the the pub.sync:wait and pub.sync:notify

The scenario goes like this:
A process is triggered by catching a document, next step takes some info from that original document and creates another document.
The document is create to the outside system, in which someone will see that document, take some actions and later when it’s done it changes the document status. (You may see it as sort of trouble ticketing system)
After creating the document I want to wait for the status change of that document. For that, the flow step I’m using is the pub.sync:wait.
Meanwhile there is a trigger that picks up documents with the changed status and delivers them to a service that will use the pub.sync:notify to tell the parent service to continue.
To match the documents I’m using the internal ID of the document as a the key parameter.

My problem now is that while waiting, other documents can change it’s status and they get picked up by the trigger. And when that happens the process fails with a time out, before the time limit is reached (which is around 180).
So when right document changes status everything works fine.
If I change the status of a wrong document, the process fails with a timeout. Shouldn’t the pub.sync:wait keep waiting for the correct notify?

I hope I explained myself, any questions please do. Thanks in advance for any help

Hello, problem described above was related to wrong setting of the value field of the pub.sync:wait and pub.sync:notify. Resolved now.

But now I have another question:
Can the pub.sync:wait and pub.sync:notify be used in a scenario where there are some waiters and only one notify?

Example: More than one service creates one document, but only one trigger catches the closed status of the those documents and calls a service with notify to warn the respective service (matching by KEY parameter) to continue?

I’m trying to implement this scenario but again, when a document for which there is no service waiting is closed, there is immediate time out of the waiting services.

Thank you again.