Necessary tools and artifacts
As mentioned earlier, to solve this problem – BizTalk Server: Transform text files (Flat Files) into XML – we must create at least two artifacts:
- Flat File Schema: withall the necessary information embedded in the form of annotations in XML Schema (XSD), such as the delimiter symbols, or the element size in a positional file, i.e. the definition of the rules of parsing (transformation rules). This type of artifact can be created manually or with the tool “BizTalk Flat File Schema Wizard”.
- Receive (and Send – optional) Pipeline: that will be responsible for processing and transforming the text file (Flat File) into its equivalent XML. This artifact can be created using the BizTalk Pipeline Designer.
BizTalk Flat File Schema Wizard
BizTalk Flat File Schema Wizard tool, integrated in Visual Studio, which allows us to easily and visually make transformation of text file (Flat File) into its equivalent XML representation. This tool supports two types of text files:
- Positional text files:
HEADERXXXXXXXXXXXXXXXXXXXXXXX BODYXXXXXXXXXXXXXXXXXXXXXXXXX BODYXXXXXXXXXXXXXXXXXXXXXXXXX FOOTERXXXXXXXXXXXXXXXXXXXXXXX
Note: Header is in Portuguese “Cabeçalho”, therefore the text from the image is in Portuguese
- Or delimited by symbols:
1999990;1;P0110;1;1;20110307; 1999990;2;P0529;2;2;20110307; 1999990;3;P0530;3;3;20110307;
BizTalk Pipeline Designer
The editor of pipelines, BizTalk Pipeline Designer, allows us to create, visualize and edit pipelines; move pipeline components between the different stages and configure pipelines components.
This editor is integrated into Visual Studio and is mainly composed of 3 modules:
- Properties window: in this window we can see and modify the properties of components in the different stages of the pipeline.
- Toolbox window: is used as a source for the design surface, it provides access to all the components that we use in pipelines.
- Design surface: where components from the Toolbox are dragged and dropped, which allows us to draw a graphical representation of a pipeline by inserting the components, available in the toolbox window, in the different stages of the pipeline.