BizTalk Design Document
BizTalk Design Document
BizTalk Design Document
Prepared for
NALCO
Thursday, 1 December 2011
Version 1.0
Prepared by
MPS Partners
Contributors
Ashish Talati
The information contained in this document represents the current view of MPS Partners, LLC. on the issues discussed as of the date of publication. Because
MPS Partners must respond to changing market conditions, it should not be interpreted to be a commitment on the part of MPS Partners, and MPS Partners
cannot guarantee the accuracy of any information presented after the date of publication.
MPS PARTNERS MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be
reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or
otherwise), or for any purpose, without the express written permission of MPS Partners, LLC..
MPS Partners may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document.
Except as expressly provided in any written license agreement from MPS Partners, the furnishing of this document does not give you any license to these
patents, trademarks, copyrights, or other intellectual property.
The descriptions of other companies products in this document, if any, are provided only as a convenience to you. Any such references should not be considered
an endorsement or support by MPS Partners. MPS Partners cannot guarantee their accuracy, and the products may change over time. Also, the descriptions are
intended as brief highlights to aid understanding, rather than as thorough coverage. For authoritative descriptions of these products, please consult their
respective manufacturers.
2010 MPS Partners, LLC.. All rights reserved. Any use or distribution of these materials without express authorization of MPS Partners is strictly prohibited.
MPS Partners and Windows are either registered trademarks of MPS Partners, LLC. in the United States and/or other countries.
The names of actual companies and products mentioned herein may be the trademarks of their respective owners.
Page ii
BizTalk Technical Document
Author
Version
Change reference
10/18/201
1
Ashish Talati
1.0
Created
11/30/201
1
Ashish Talati
1.1
Reviewers
Name
Version
approved
Position
Date
Page
BizTalk Technical Document
Table of Contents
1
Environment.....................................................................................1
1.1
Overview............................................................................................................ 1
1.2
Installation Summary......................................................................................... 1
Implementation................................................................................2
2.1
Overview............................................................................................................ 2
2.2
TFS..................................................................................................................... 3
2.3
2.4
2.5
Scenario Components...................................................................................... 10
2.5.1 Cooling Data Receipt................................................................................ 10
2.5.2 Helper Components.................................................................................. 13
2.5.3 Cooling Processor..................................................................................... 14
2.5.4 Testability.................................................................................................. 16
3
3.1
Page
BizTalk Technical Document
Environment
1.1 Overview
The NALCO BizTalk proof of concept did not plan for performance testing as a
success criteria, so a highly available environment was not created. Two
environments were created for the POC:
Developer Integration Server: Solution was deployed to this server for testing
purposes. This environment is typically were multiple developers code is
integrated and tested before moving on to a QA process.
Windows 7
IIS 7
IIS 7
Because each of the environments were installed with single server envionrments,
the installations were very basic and followed the installation guides from Microsoft.
The following guides were used:
Development Workstation:
Installing BizTalk Server 2010 on Windows 7 and Windows Vista.docx
Development Integration Server:
Installing BizTalk Server 2010 on Windows Server 2008 R2 and 2008.docx
Page 1
BizTalk Technical Document
Implementation
2.1 Overview
The following is the high level process when a Boiler or Cooling controller Data file
( either in email format or an XML Format ) is received:
File Receipt:
o
File is Archived
Schema Validator
Business validation
Business Process
o
Monitoring
o
This document will now describe each component of the scenario in a little more
detail to show how this was implemented using BizTalk Server.
Page 2
BizTalk Technical Document
2.2 TFS
All source code are stored in TFS @ $/3DT Web/WPS Biztalk Projects
A separate BizTalk application and solution are created for each Parser. Every
solution is following same naming convention based on type of artifacts for BizTalk.
The default naming convention is that the name of a folder containing a BizTalk
Project is identical to projects output DLL name ( without extension ). For example,
if BizTalk project resides in Cooling.Controller.Orchestrations folder, then that project
must output a DLL named Cooling.Controller.Orchestrations.dll
Typical example of project naming structure is
Orchestration = Project.Orchestraions
Pipelines = Project.Pipelines
Pipeline Components = Project.PipelineComponents
Helper Components = Project.Components
Schemas = Project.Schema ( or Project.Generated.Schemas )
Maps/Transformaton = Project.Transform
Unit Tests = Project.Tests
Cooling Alarms, Cooling Data, Cooling Apache email messages are picked up
by BizTalk Receive Location
Parses email Header and store that information into context properties
Parses email body and using BizTalk flat file disassembler component
will convert Flat file into XML ( for apache and data ). For alarm parser
XML file is created with appropriate email body as received
Page 3
BizTalk Technical Document
Pipeline component will drop either apache, alarm or data XML message to
BizTalk MessageBox
Alarms Data
Email Data
o
Workflow will find out ControllerId based on controller header data and
insert data into ParameterValuesN or ParameterValuesT for each
section data received for controller
Apache Data
o
Page 4
BizTalk Technical Document
Since not all the groups can come in data file, Choice Group option with max
Occurs of 0 is set for all sections.
Page 5
BizTalk Technical Document
The schema was modified to relax the way input data was received. This was done
to allow looser checking of data in the pipeline ( for e.g. not always all data section
are received in input message )
The Cooling property schema was created to store the most common data field in
message context. When message is received in BizTalk, it contains the actual data
as well as the message context. The message context is same concept as Message
Header, SOAP Header or WCF Header as in a container to store various properties
that can be used throught BizTalk Process.
There are two types of message context properties. Property fields are context
properties used by BizTalk Messaging enging mainly for message routing and some
evaluations within BizTalk Orchestrations. One limitation is they can be upto 255
characters.
It provides centralized mechanism for pulling key pieces of information that is then
easily accessible to BizTalk Server components that are handling the message as it
passes through BizTalk Server.
Page 6
BizTalk Technical Document
Email header related data are used throughout the process to subscribe and/or
route message along the process.
The way to identify if its property schema is by looking into its Properties windows
with a Schema Type as Property
The Cooling Alarm schema will transform Cooling Alarm data from email body in Flat
file to message schema
The Cooling Apache schema will transform Cooling Apache data from email body in
Flat file to message schema
Page 7
BizTalk Technical Document
Record Schema
The data that are received for Cooling controller has multiple sections and each
section has multiple rows. For every single rows that is received in data, we need
to update Parameter Table for all parameters for that row. To improve the
performance instead of calling stored procedure to update parameter values for
every single column in a row, the whole row is send to SQL server as Composite
Operation. Following is the sample of DATA2 Section received with multiple rows
with specific parameter values for that timeframe.
[DATA2]|
02/23/2011 04:15
-999.00
0.00 0.00
128
0
104.22 49.84
0.00 0.00
0.00 0.00
128
0
1151.34
0.00 0.00
128
0
0
0
0.00 -532.00
1.06
-14.51 11.16 94.42 0.00
0
0
128
0
|
0.01
1
128
107.91
1
0
02/23/2011 04:30
-999.00
0.00 0.00
128
0
105.99 50.80
0.00 0.00
0.00 0.00
128
0
1149.05
0.00 0.00
128
0
0
0
0.00 -532.00
1.06
-14.44 11.17 95.27 0.00
0
0
128
0
|
0.01
1
128
109.49
1
1
02/23/2011 04:45
-999.00
0.00 0.00
128
0
105.54 50.84
0.00 0.00
0.00 0.00
128
0
1181.72
0.00 0.00
128
0
0
0
0.00 -532.00
1.00
-14.28 11.14 95.34 0.00
0
0
128
0
|
0.01
1
128
109.51
1
2
02/23/2011 05:00
-999.00
0.00 0.00
128
0
105.84 51.24
0.00 0.00
0.00 0.00
128
0
1190.01
0.00 0.00
128
0
0
0
0.00 -532.00
1.00
-14.28 11.14 95.44 0.00
0
0
128
0
|
0.01
1
128
110.25
1
2
[END_DATA2]|
To process and perform Composite operation on a single row, for every single
section a new Schema is created for simpler mapping process. Looping and parsing
single record from a source data is done within BizTalk Orchestration using xPath.
Page 8
BizTalk Technical Document
Page 9
BizTalk Technical Document
Scenario Components
1
The purpose of the cooling receipt process is to archive the message that is
received ( with an ability to disable at runtime ) and bring the cooling data into
BizTalk and transform it to a format that can be used to process the message. This
process is represented by the BizTalk receive pipeline as shown below:
Cooling Receive Pipeline Component
Page 10
BizTalk Technical Document
File Archive
Disassemble Component
Single Component to process Cooling water Data, Alarms and Apache Data
Parse the incoming email message ( as *.eml ) and create a strongly typed
.Net Object
Page 11
BizTalk Technical Document
Archive Data
Disassemble Flat file email Body data and create XML representation using
BizTalk Standard Flat file disassembler.
Page 12
BizTalk Technical Document
Helper Components
Helper Components are .Net Class Library that are used throughout the Business
Processing. They are used from within Pipeline Components or from within
Orchestrations.
Page 13
BizTalk Technical Document
3
1
Cooling Processor
Composite Update
The out of box WCF-SQL adapter enables adapter clients to perform composite operations on
the SQL Server database. A composite operation can include:
Insert, Update, and Delete operations. A Select operation is not supported as part of
a composite operation.
A single composite operation can have any number of these operations, in any order.
Composite operation pattern is implemented to improve performance and send multiple
calls to Stored procedure as a single composite operation.
BizTalk mapper is used to create maps, which are used for translating and
transforming xml messages. Depending on the type and complexity of
transformation, following different transformation features in within BizTalk Mapper
are used
Page 14
BizTalk Technical Document
Using XSL
BizTalk mapper by default uses XSL to perform transformation and
translation. If out of the box functoid provided by BizTalk doesnt satisfy
business requirement, they can be extended with using custom XSL.
Page 15
BizTalk Technical Document
Testability
All BizTalk Artifacts had unit Testing enabled and depending on type of BizTalk
Artifact Object mocking was performed if needed.
Schema Testing
Page 16
BizTalk Technical Document
Once the project is enabled, testing can be performed using TestTools provided by
Microsoft BizTalk Assemblies.
Maps Testing
Maps can be tested as Schema, alternatively BizUnit ( open source ) was used to
perform BizTalk Map testing as well as validating the output data via XPath
Page 17
BizTalk Technical Document
PipelineComponent Testing
Page 18
BizTalk Technical Document
BizTalk
BizTalk has its own tracking and debugging capabilities built into the administration
tool. We can use these abilities to get information about the processes being run as
well as view message contents and processes. Please see screenshots below:
We can also use the administration tool to debug the orchestration processes or
view a process that occurred in the past.
Page 19
BizTalk Technical Document