BizTalk Bootcamp - Day 2 Diary: Nuggets (Schemas, Maps, Pipelines) - Willy-Peter Schaub's Cave of Chamomile Simplicity

BizTalk Bootcamp - Day 2 Diary: Nuggets (Schemas, Maps, Pipelines)

BizTalk Server 2004 Enterprise Edition box f Continued from http://dotnet.org.za/willy/archive/2008/05/12/biztalk-bootcamp-day1-diary-nuggets.aspx. Today we focused on BizTalk Schemas, Message Transformation using Maps and Message Processing using Pipelines.

Here are my rough notes ...

Schemas

Types | Extensions
  1. XML
    • Native XML message types
    • Defined in XML Schema Definition Language (XSD)
  2. Flat File (FF)
    • Supports delimited or positional file formats
    • Uses XML tags to represent values, storing tag information using the annotation capabilities of XSD
  3. EDI
    • Special type of formatted text message
    • EDIFACT and X12 formats supported by BizTalk
    • As with FF uses XSD annotations to define format
Creation Options
  1. From scratch for message schemas with no instances, supporting XML, flat file, or EDI message types
  2. From scratch with other schemas or using the wizards, assisting with complex schemas
  3. From an instance message, creating a XML schema based on a particular instance message
  4. Modify existing schemas, using the BizTalk Schema Editor
  5. Flat File Schema Wizard
    • Create flat file schemas from flat file message
    • Get some energy drink before visiting the flat file schema generation wizard ...  not for the fainthearted!
  6. Generate Metadata adapters (SQL, WCF, SAP, etc.)
Methods of reuse

Import

  • Import schema from different project | namespace.
  • Allows access and type usage of imported schema.

Include

  • Include schema from same project | namespace.
  • Allows access and type usage of included schema.

Redefine

  • Not used much, but allows removing | adding to redefined schema
  • Redefine schema in the same namespace

Promoted Properties and Distinguished Fields

Field needed for Routing --> Promoted Property

  • Used for publish and subscribe message routing
  • Max 255 characters
  • Exists in its own property schema

Field needed for Orchestrations --> Distinguished Field

  • Used make decisions based on message content in orchestrations
  • No limit in characters
  • Not usable for routing or pipelines ... see promoted properties.
  • Better than using XPath in orchestration as field is loaded in context when entering orchestration

HINT: Always define your own property schema. Default is not always the best option!

Maps

  • Mapping is the process of copying data from one XML document to another
  • Mapping is an in-memory process from top to bottom
  • Validation of instance messages is done during testing, not execution
  • BizTalk supports 50 pages in the Map Editor, Visual Studio will only display a maximum of 20

HINT: SHIFT-drag-record from left to right record in map editor will map all elements within record.

Functoids
  • Deliver about 80% of the most common functions, 20% would be custom functoids.
  • Common categories are:
    • String
    • Mathematical
    • Logical
    • Date|Time
    • Conversion
    • Scientific
    • Cumulative
    • Miscellaneous (advanced)
      • Combining multiple records
      • Looping, Conditional Looping
      • Scripting (C#, JScript, VB.NET, XSLT) ... preference is to call an external assembly (GAC'd) instead
      • Database
      • Transformation using custom XSLT
      • Debugging
  • Q: How many functoids can we link? A: How wide is the grid?

HINT: To move a functoid between pages, select functoid and all its links. You are then able to move the functoid.

HINT: Label links to make the functoid arguments more readable.

HINT: Dropping  a functoid on another functoid, simply replaces the original functoid.

Map Transformation
  1. Pipeline Execution
    • One in, one out
    • Property promotion occurs in the disassembler process of the receive pipeline
    • Caution: If property is promoted both in source and destination, the value of the source property sticks.
  2. Orchestration Execution
    • Multiple in, multiple out
    • Copy individual or all properties using:
      • msgName(PropertySchemaNamespace.propertyName)
      • msgNameTarget(*)=msgNameSource(*)
  3. BizTalk 2006 has 1MB threshold when loading documents into memory. Documents larger than configured threshold are buffered to file system.
Best Practices
  1. Large amount of memory is available? --> Increase the TransformThreshold
  2. Minimize the use of maps inside of orchestrations
  3. Use distinguished fields or promoted properties to extract or set properties where possible.
  4. Minimize the use of multiple inputs in orchestration transformation shapes.

Pipelines

  • Context of pipeline is identity of host
  • Standard Pipelines:
    • PassThruReceive
    • PassThruTransmit
    • XMLReceive
    • XMLTransmit
    • EdiReceive
    • EdiSend
    • AS2EdiReceive
    • AS2Receive
    • AS2EdiSend
    • AS2Sendexhausted3.png
  • Receive Pipeline
    • Decode
    • Disaasemble
    • Validate
    • Resolve Party
  • Send Pipeline
    • Pre-Assemble
    • Assemble
    • Encode

Cheers, I now need a few hours of serious sleep ... my brain is fried ...

Published Tuesday, May 13, 2008 7:43 PM by willy

Comments

# BizTalk Bootcamp - Day 3a Diary: Nuggets (Lab)

Wednesday, May 14, 2008 9:01 AM by Willy-Peter Schaub's Cave of Chamomile Simplicity

Continued from dotnet.org.za/.../biztalk-bootcamp-day-2-diary-nuggets-schemas

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: