I have recently been trying to solve a customers integration problem which is described below
A system produces two files, one batch of invoices and one reconcilliation file that contains data that summarizes the batch. The application needs to gather the two files, validate the batch against the reconcilliation and do some other things with the files which are not relevent to the problem I am having and therefore will not explain 🙂
- The files are dropped into two independent file locations
- The files are not dropped in any sequence, so either may arrive first
So I plumbed for the parallel convoy pattern with two activating recieve ports, one for the batch and one for the reconcilliation file both correlated on some properties in the message (systemid and batchid), pretty standard stuff so far right?
Then enter the killer question…
What happens if one of the two files does not arrive?
Simple you may think, implement this in a scope and set a timeout! and of course you are right and this works.
Now enter the problem I am writing about… (hope you are still with me!)
How do I identify the file that did arrive, and how do I get at the message so I can do something with it???
I can not seem to get access to it through the exception or compensation blocks, and I have read that that this may be due to the fact that there is no guarantee that the message exists, but surely there must be a way to get at this, surely!
Anyway any help would be appreciated.