Saturday, September 18, 2004
I tend to get about at work (not in the, ahem, naughty sense!) and while in Norwich a client wanted to validate their document to ensure that the end users had filled in all of the correct details. Simple standard stuff. However, when I explained that validating the document using a pipeline would suspend the message at the first error, they didn't exactly jump with joy!They wanted to validate the document, but provide all of the errors in one go to the client if the document failed validation.
In order to do this, we proposed following the pattern used by the Swift Accelerator for BizTalk. The accelerator uses a disassembler that implements validation using business rules (run from the disassembler itself) and stores all errors in a separate document. It does not fail at the first error, but simply tries all of its rules and outputs all errors associated with the document in one go by returning the original document plus a document containing the errors.
This allows all sorts of interesting scenarios to occur, such as implementing an orchestration that handles errors allowing resubmission, notification to interested parties, etc. Quite powerful!
In the case of my client, we suggested running the business rules from within orchestration, but the concept remains the same.