In this case, if it is the target that needs things in groups, then the target process/adapter should do the queueing/batching. The source process should have no idea that it is happening. As far as it’s concerned, the PO is sent. The Broker’s job is to get published documents to the subscribers as quickly as possible. Don’t make it hold on to documents for an extended period of time. Such an approach is not scalable.
IMO, this is a broken process. If the PO isn’t ready to go immediately to the end points, it shouldn’t be published. Holding on to multiple versions and trying to sort out what was the last one within the integration layer is asking for trouble. IMO, you need to convince the right people to not do things this way.
A couple of questions: What are the “business rules?” Generally speaking, business rules in the integration layer should be avoided. Why are you publishing the PO? Are there multiple subscribers? I’m not a big fan of pub/sub for most business processes.
Since the source system (or its users) apparently still operates in a batch mode, instead of having the source publish things right away don’t publish anything until the “batch window” begins. Then have the source system insert into the buffer table only the current record for each PO.
Do the users actual insert row(s) into the tables? If so, you may need to try to get them away from doing that. They shouldn’t do anything that indicates “do integration now.” They need to be in an “application mindset.” Meaning, they edit the POs and such to their hearts content. At some point they say its “done” or “committed” or something. To change it, they need to indicate a “cancel” or “modify” or some other indicator. These state changes should have significant meaning to the application itself. Integration can then monitor for these state changes and do the right thing. Implementing “oh I changed my mind on that PO” within the integration layer is a bad, bad idea.
#broker#webMethods#Universal-Messaging-Broker#Integration-Server-and-ESB