Pergunta

This is more of an academic question than a practical one, but I'm trying to gain a more in-depth knowledge of BizTalk.

In this scenario I'm getting a FlatFile with a head line and then repeated entries. The consensus seems to be that in order to make this work correctly I should have seperate head and body schemas, and use these as part of the disassembler portion of the Pipeline Component that I'm building.

Now, on the FF disassembler, there's a property "Validate Document Structure" that defaults to false. This Link seems to say that it will validate the header and body (not necessarily an issue). However, it also hints that I can use an XML validation component in my pipeline to do the same thing.

My question is twofold: First, is it possible to use an XML validator for these flatfiles after they're disassembled? Has the FF information already been converted to XML in the disassembler?

Secondly, why would I want to use the XML validator even if it's possible? Perhaps for if I discard the header line and don't want to risk validation errors from variant header lines?

Foi útil?

Solução

To answer the specific questions:

  1. Yes.
  2. Yes, if there is a Flat File Disassembler in the Disassemble Stage.
  3. You generally would not.
  4. Not really. The Flat File Disassembler is very specific anyway so any malformed structure would likely have already caused an error.

I don't recall ever using the XmlValidator in the same Pipeline as a Flat File Disassembler.

Outras dicas

I'd like to clarify some things here. In certain usage scenarios, you absolutely do want to use XML validation rather than enabling validation inside the disassembler.

Let's say you have a flat file with 6 messages. 5 of them are compliant with your body schema, and 1 is not. You want to enable failed message routing, but you don't want the entire transaction to fail.

If you enable validation through the FF Disassembler along with Recovery Interchange Processing, it will work... but only partially! If message #4 is the corrupt one, only messages 1,2, and 3 will successfully route. 4,5,and 6 will be routed as one huge failed message.

HOWEVER if you define the Head/Body schemas in the disassembler, disable validation, disable RIP, and add an XML Validator that uses the body schema with RIP, then messages 1,2,3,5, and 6 will successfully route. Only message #4 will be routed as a failed message.

EDIT: Here is where you can also find this information in perhaps a more digestible format.

Thanks again to @boatseller for the clarification, and here's a very real-world situation in which I'm having to use XML validators in this pipeline.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top