Publish multiple document and waiting one reply

To All Expert,
Can we published multiple document using one service and waiting only one reply from the subscriber?

Anybody can give some guideline.

Regards
Cliff Seow

Cliff,

I think I would do this by using pub.publish:publish multiple times to publish all but the final document followed by pub.publish:publishAndWait to publish the last document and wait for the single reply.

Your subscriber would need know somehow that it had received all of the documents in that particular “batch”. One way to do this would be to set a field in the document to contain the total number of documents to be published in that “batch”.

See the Publish-Subscribe Developer’s Guide and the “Publish Folder” section of the Built-In Service’s Guide for additional details.

Mark

Mark

Mark,
Yes you are right. I have follow your guideline, it’s work. But the only different is I use a trigger with AND condition for multiple publishable document. When the last publish document received then I use publishAndWait to publish a reply document and waiting for a reply.

thanks for your help.

Regards
Cliff Seow