Discover: BizTalk Server 2010 Developer Training Kit
When I was searching for a more visual representation of how BizTalk works, I've stumbled across a tutorial series on youtube that was very usefull to me.
I've taken notes, which you'll find below, but I would strongly recommend you watch the videos yourself as they are very informative!
I've taken notes, which you'll find below, but I would strongly recommend you watch the videos yourself as they are very informative!
The video's take about 1 hour to watch (per subject), there are 18 video's available.
https://www.youtube.com/watch?v=qrqhPVBbGTU&list=PL7KtZC4GHpj7mbhQYasIBECuX6Gf6RUO7
Module 1: Introduction
-> XML / EDI / Flatfile
-> Receive port:
- Receive adapter resonsible for the communication link between the system that is sending data to BizTalk
(ERP, SQL Server)
- Receive pipeline: Pre processing of the data
= receive location
-> Mapping: To transform the message to XML for BizTalk
-> BizTalk messagebox: detailed tracking info / looks for business processes who needs the message
-> Orchestration: Adds transformations, business rules, forwards etc.
-> Back to the messagebox to look for subscribers to the message.
-> Send port:
- Mapping to other format,
- Send Pipeline,
- Send adapter.
-> XML / EDI / Flatfile
BizTalk editor: Define schema's. Describe your message to any level of detail. You are editing an XML schema document;
- Define elements / attributes,
- Define order,
- Number of occurences,
- Required or optional,
- restrictions.
Pipeline designer process messages, decryption/encryption
- Decode / Encode
- Validate incoming documents against XML Schema's
Orchestration designer:
- Design business processes
Module 2: Creating schema's
XML elements and attribute names are case sensitive. Namespaces in XML provide unique names for elements and attributes. Prevent naming conflicts with other schema's <sales xmlns = "http://Destil.nl/sales">
You can prefix namespaces:
xmlns:prod = "http...." results in <prod:id> ... </prod:id> <prod:price>...</prod:price>
In BizTalk server a schema with a certain namespace will create a message with that same target namespace.
If a message namespace isn't found in the schema's it will suspend the message to the BizTalk Messagebox.
A XML schema defines datatypes, elements and attributes.
You should always root elements with the name "schema".
Flatfiles and EDI files can be translated to XML using schema's.
Using multiple schema's:
Import: Imports a schema into an other schema accesses and uses types defined in the imposrt schema, provides for using types from schema's in other namespaces.
Include: includes schema elements from an other schema with the same namespace.
Redefine: Derived from the other schema, but not exactly the same.
Add schema namespace in properties. The default namespace is the name of your project.
A record is a parent and can have children.
A field can't have children.
Element = <firstname>
Attribute = person name = "">
Deployment: Build an assembly. Building your project creates assembly in Bin as a .dll file.
Module 3: Creating maps
Canonical schema's are internal schema's that are more complete. It allows you to think more in terms of business processes.
You get an individual system format, translate it to canonical format, and then to an other individual system format.
A map is as XML transformation.
You can use functoids for convertion.
There are different ways to link in maps:
- Drag and drop,
- Link on structure
- Link on name
Using advanced functoids to:
- manage looping records,
- define conditional mapping,
- define custom scripts,
- copy the entire elements of data.
Database functoids: Used to extract data from a database. Uses ADO datasets (lookup, error return, format message, value extractor).
Scripting functoids are used when standard functoids do not provide required results. They can call an external .NET assembly.
Module 4: Deploying and managing BizTalk applications
PubSub architecture: Configuration database (management db).
BizTalk Applcations exists of artifacts:
- Schema's
- Maps
- Pipelines
- Orchestrations
Message components:
- Receive ports
- Receive locations
- Send ports
- Adapters
Application deployment steps:
1. Configure each assembly with a strong name
2. Set application deployment properties
3. Build the application
4. Deploy
5. Create physical send and receive ports
6. Enable ports and enlist orchestrations
Strong name key file (.snk) exists of a unique string derived from encription key (public key token).
Configuration of the deploymentsettings. Set redeploy to true, overwites assembly but keeps configuration settings for send ports plus other settings.
Bindings are application configuration settings. They are useful for moving configuration settings and can contain logical-to-physical port binding info when using orchestrations.
You can export an application to a MSI (Microsoft Installer) package,
- Bindings
- Components
- Business rule policies
- Non BizTalk components
The components are registered in the BizTalk Management database.
You can use the command line (BTSTask) to deploy or remove an application.
Command:
BTSTask removeapp - Applicationname=" ... "
Module 5: Routing messages
Receive location exists of a receive pipeline and a receive pipeline.
Messages go to the messagebox database, Message context properties will match a subscription.
Messages:
1. Received, processed and published to the msdb.
2. Message properties are evaluated to determine which subscribers require a copy of the message.
3. A copy of the message is delivered to each subscriber.
Orchestration picks the message up, when it is done with the message it goes back to the message box looking for other subscribers.
When no subscribers are found the message will stay in the message box and gets the status suspended.
A sendport can also have a subscription on a message.
The messagebox Database:
- Stores subscription information,
- Delivers messages to subscribers,
- Stores the queues and state tables for each host
Message routing:
- Content based routing extract values from a message and includes it in the message context.
- Content based routing extract values from a message and includes it in the message context.
Filter expressions discribe a subscription. On a port: CustomerName == Destil
What is a port? A port specifies:
- How messages are sent and received by BizTalk.
- How messages are sent and received by BizTalk.
- The communication direction and communication patterns.
- The location where messages are received or sent.
A port is a configuration object.
Receive port:
- Maps
- Maps
- Receive location
- Configuration settings
- Messagebox database
- Send port -> maps
Receive location watches an URL or file location;
- receive adapter
- receive pipeline
- Mapping (From FF to xml)
- Messagebox
- Orchestration (has a subscription on the message)
- New message to the msdb
- Send port, map to other format, send!
Property promotion:
Fields that you choose promote within a message instance.
Makes the data in the field accesable to the BizTalk services.
Quick promotion automatticly creates a schema.
Enable message routing:
1. Promote fields to be filtered.
2. Create receive port and location.
3. Create a send port (or send port group).
4. Create and configure send port filters.
5. Start and enable ports and locations.
A XML receive pipeline can be used for property promotion.
Configuring send port filters:
- Filter the messages based on an expression,
- Route to a sendport (Example: Amount > 5000)
- Used to subscribe to failed messages
Port enlisted determines if messages are to be routed, enlisting creates a subscription in the messagebox database.
Starting a port begins processing of messages.
Bound: No subscriptions.
Module 6: Creating pipelines
A pipeline is a set of components, containers of configuration settings that works toghether to process a message as it enters or exits BizTalk.
Receive pipeline stages:
- Decode: Decode or decrypt inbound messages,
- Disassemble: Convert, split batched messages,
- Validate: Validate schema against message,
- Resolve Party: Verify sender
You can add promoted properties info to a schema, is providing instructions to a pipeline component that will execute in the disassemble stage and add them to the message content.
Send pipeline stages:
- Pre assamble: Use to process a message before it is send
- Assemble: Use to assemble or serialize a message / convert from XML to native.
- Encode: To encode and encrypt messages for secure document exchange.
XML Disassembler:
Promotion of field -> annotation -> XPath statement
The disassembler uses a Xpath statement to find the field in the XML and write it to the message context.
It can read message type;
When it receives a message it reads the root node.
It looks at the xmlns for that rootnode and it wil concatenate a string "xmlns"#"name of root node" -> Lookup for schema.
Default pipelines:
- PassTru: Receive and send, no components in pipeline, no decoding, disassemble, or validation.
- XML: Contains XML disassemble component (property promotion), a party resolution component for security but no decoding and validation.
A flatfile disassembler needs a set of schemas (to be defined in the properties window) that defines the body of the flatfile.
Recoverable interchange processing = true means an envelope will be handled one message at a time, the correct ones will pass and the incorrect ones will fail.
When you set this property to false the entire batch will fail when one message is incorrect.
Debatch XML: property: Envelope to true -> XML Disassembler will debatch the messages and Xpath statement by setting body property in the schema designer.
Maak jouw eigen website met JouwWeb