Hi,
Here is my suggestion on this,
As per my understanding in the post. When the B flow service publishes the data to SAP system once A flow service successfully send the data to the SAP system. otherwise SAP system isn’t accept the B flow service data.
In the above case, is there any unique number to identify the incoming documents? If yes, when A flow service receive the data, insert the unique number and put the process status as ’N’ until it successfully sends to SAP system. Once process is completed update the status as ‘Y’ in the database table. If B flow service receives the data with same unique number, check in the database table whether ‘A’ flow service successfully process or not. If it successfully then process ‘B’ flow service data to SAP system.
In case of ‘B’ flow service receives some data, then it checks the database table whether the ‘A’ flow service data successfully processed or not. If there no data comes in the A flow service, then throws an error to sending system that the particular data is not received or wait till the data is received and processed
Hope this will helpful for you.
#webMethods#Integration-Server-and-ESB#Flow-and-Java-services