Publishing a document to the Broker and waiting for a reply
Two scenarios:
1) Publish and wait for reply (Broadcasting)
2) Deliver and wait for reply(Deliver to a particular client).
IS wM 6.1
1) Publish and wait for reply (Broadcasting to all clients) :
1) Create a publishable document and push to broker
2) Create a service for publishing a document and waiting for reply,when the reply Comes/ a reply document comes perform a task/write the content of doc to a file
a) Pub : publish : publish and wait
Service in: I/p
Doc type name â copy and paste pub doc path
Pub doc (ref) document
Receive doc type name - copy and paste broker doc type path
Local â false
Async - true
(Broker or client must not be present at the time of communication)
Pub : publish : wait for reply
Receive document path of reply doc (ref)
Sample .IO . test . write to file
File name - destination file name
Reply doc (Ref) - file content
3) Create a broker Document type . (reply ref)
a) Go to broker
b) Get the reference of reply document
c) Create a broker Document of this reference.
At the subscriber side:
1) Get the reference of publishable document from the Broker and create a Broker document type.
2) Create a trigger which on receipt of publishable document performs a service.
3) Create a service which executes on receipt of a publishable document.
Pub : string : concat value - reply doc ref
Pub : publish : reply
Pipe in Service in
Doc ref Document
Reply - Env (envelope) Receid doc Envelope
document type name - copy and paste reply doc path
4) Create a document (normal) with some fields and make it a publishable document this is called a Reply document, which we send as a reply / Acknowledgement to the Broker.
Description:
The publisher creates a publishable document and pushes it to Broker . The broker get its reference and fires a trigger which runs a service and creates a reply document which is publishable and pushes it to broker.
The publisher gets the ref of the reply document from the Broker and performs a service.
When the publisher runs the publish service it publishes the doc to broker .the Subscriber gets the document performs some operation on the received doc and replies back to the publisher with another doc.
The publisher upon receipt of the reply document performs a task/service/write the content of the reply document to a file.
2) Deliver and wait for reply on publishers side (to a specific client) :
1) Create a publishable document
2) Create a service for delivering the publishable document and wait for reply and then accept the reply and do some functionality.
Pub . publish : deliver and wait
Document type name â copy and paste pub doc path
Document
(Ref of pub doc) -> Receive doc type name - path / copy and paste reply document path
Destd -> Go to broker admin of the broker select the broker server select/clients,then click on the subscribing trigger to get trigger id.
Then find the trigger of publisher by name . Copy the whole trigger id and paste it
Asyn - true
(For asynchronous transfer/ publishing ).
3) Creating a reply document
Go to broker and check for the subscribers reply document and create a reply document.
On subscribers side:
1) Get the reference of publishable document from the broker and create a broker document type.
2) Create a trigger which on receipt of the publishable doc Executes a services
3) Create a reply document (normal)
With some fields and make it a publishable document this is called a Reply document which has to be send as a reply/ acknowledgement to the broker.
4) A service which has to be executed on receipt of a published document
Pub . string . concat (any service which has to be executed on receipt of pub doc and manipulation on pub doc). Ref of Pub doc
Field 1 - string 1 value
Field 2 - string 2 value
Pub . publish .reply
Reference of reply doc - document
Env (envelope) - received document
- Document type name - copy and paste reply doc path.
