SlideShare una empresa de Scribd logo
1 de 27
8 Tips & Tricks
                      for
Better BizTalk Programming

     Based on an MSDN article by
  Marty Wasznicky & Scott Zimmerman

             Daniel Toomey
               presenter
Credits
 Marty Wasznicky (MCSE, MCSD, MCDBA, MCTS) is the
  Regional Program Manager for BizTalk Server in the Microsoft
  Connected System Division. He helps customers and Microsoft
  Partners adopt and implement Microsoft solutions in this space.
  Currently, he is working on Software Oriented Architecture and
  Enterprise Service Bus technologies. He lives with his wife in
  Los Angeles.

 Scott Zimmerman (MCSD, MCTS) is a senior application
  development consultant with Microsoft specializing in BizTalk
  and .NET. He has won two awards for Web service design and
  the Overall World Frisbee Championship eight times. He lives
  with his wife Vera in Washington, D.C.
The Article

“8 Tips and Tricks for Better BizTalk Programming”

  http://msdn2.microsoft.com/en-gb/magazine/cc163423.aspx

Discusses:
 Multi-Part Messages
 Direct-Bound Ports
 Creating Web Services
 Debugging XSLT
The Tips
1.   Always use multi-part messages
2.   Always try to design orchestrations with direct-
     bound ports
3.   Always use separate internal and external schemas
4.   Never expose your internal schemas directly in
     WSDL
5.   Always optimise the BizTalk registry for Web
     Services
6.   Always set the assembly key file with a relative path
7.   Never overlook free sample code
8.   Debug XSLT in Visual Studio
#1 – Always Use Multi-Part Messages
       Most messages in BizTalk are schema-based
         What if the schema changes?
         Not too bad, unless send/receive shapes use it:
         Property value is not valid: One or more Send or Receive actions are connected to Ports
          and are using this Message. Please disconnect the actions before changing the Message
          Type.

       Process to change schema bound to ports:
    1.    Find all send/receive shapes using message
    2.    Delete the relevant port connections
    3.    Change MessageType property on message variable
    4.    Reset the operation’s MessageType property on all
          relevant port types
#1 – Always Use Multi-Part Messages
   Solved by a level of indirection
   Multi-Part message type can wrap the underlying
    schema
       Create a new Multi-Part Message type
       Set the message part to the original schema
       Name it appropriately (don’t use “body”!)
       Set the Message Body Part property = true
       Create messages based on this type
   Ports and send/receive shapes can now use multi-
    part message type
   Allows underlying schema changes (change the
    part definition) without breaking the port links
#1 –Use Multi-Part Messages
#2 – Use Direct-Bound Ports
Port Options in the Orchestration Designer Port Configuration Wizard
#2 – Use Direct-Bound Ports
 Binding: Physical & Logical Port Types


Create This Physical Port Type   For This Logical Port Type
Static One-Way                   One-Way / Receive or Send / Specify Later

Static Solicit-Response          Request-Response / Send Port / Specify Later

Dynamic One-Way                  One-Way / Send Port / Dynamic

Dynamic Solicit-Response         Request-Response / Send Port / Dynamic
#2 – Use Direct-Bound Ports
 For BizTalk to BizTalk communication (not Web)
 No physical ports required
 3 Types to choose from:
      Message Box Routing
         By subscription (message type)

         Complete independence

             Watch out for infinite loops!
      Self-Correlating
         Share a port type between orchestrations (parameter)

         Not necessarily dependant on message type

          (can use message type of XmlDocument)
      Orchestration-to-Orchestration
         Wiring up two known solutions

         Not as loosely coupled as Message Box Routing
#2 – Use Direct-Bound Ports
 Avoiding Infinite Loops:
    Don’t send the same message type that your sending
     service is subscribing to!
    Copy message to a new type, or…
    Change value of a promoted property and use a filter:
       BTS.MessageType ==

        “http://MyInternalSchemas.MyProject#MyRo
        otNode” AND inbound_message(status) != 1
    …or, set operation-based subscription filter on receive
     shape (i.e. BTS.Operation != <one in orchestration>)
       Caveat: Operation property not set until message

        passes through at least one orchestration(?)
#3 – Always Use Separate
     Internal & External Schemas
 Canonical schemas provide flexibility
 Insulates against changes from a 3rd party
   Altering fields or properties used in routing
   Modifying promoted properties
 Separate assemblies for schemas & maps
  makes re-deployment easier
 Can reduce number of maps required
   Combine multiple inbound schemas to one
    canonical schema
   Map canonical schema to outbound schemas
#4 – Never Expose Your Internal
     Schemas in WSDL
 BizTalk Web Services Publishing Wizard:
#4 – Never Expose Your Internal
     Schemas in WSDL
 Loose coupling
    Freedom to change orchestration without breaking the
     caller
    Preserves external interface

 Need to define and build the schemas assembly prior
  to running the wizard
      Remember to use the externally facing schemas!
 Operation names MUST match exactly (orchestration
  will be subscription-based on this operation name)
 Use XmlReceive pipeline to create MessageType
  property
#4 – Never Expose Your Internal
     Schemas in WSDL
#5 - Always Optimize the BizTalk
     Registry for Web Services
 Tweak default ASP.NET parameters
 BizTalk automatically multiplies by # of CPUs
 Steps to create a reusable script:
   Back up your registry!!
   Create a Notepad file with a .REG suffix
   Copy code from next slide
   Replace BTSHOST with the name of your
    BizTalk host (use Regedit to find key name)
   Double-click the file to install
#5 - Always Optimize the BizTalk
     Registry for Web Services
Windows Registry Editor version 5.00

[HKEY_LOCAL_MACHINESYSTEMCurrentControl
   SetServicesBTSSvc$BTSHOSTCLR
   Hosting]
“MaxIOThreads”=dword:00000064
“MaxWorkerThreads”=dword:00000064
“MinIOThreads”=dword:00000019
“MinWorkerThreads”=dword:00000019
#5 - Always Optimize the BizTalk
     Registry for Web Services
 Details about this and other optimisations:

  msdn2.microsoft.com/en-us/library/aa561380.aspx

 Performance tuning for low latency
  messaging:

  msdn2.microsoft.com/en-us/library/aa475435.aspx
#6 – Always Set the Assembly Key
     File with a Relative Path
 Sharing solution with source control is easier
 Recommendation:
      Place strong name key file in same directory as
       the VS solution file
      Create each VS project (by BizTalk artefact type)
       in a separate sub-folder
          Orchestrations

          Maps

          Pipelines

          Schemas

          Etc

      Set path for key file: "......Key.snk"
#6 – Always Set the Assembly Key
     File with a Relative Path
 Works differently for .NET components than for
  BizTalk projects
      May have to hack project (*.csproj) file
      Search for name of key file and apply relative path
       (usually only 1 parent hop)
 Don’t forget to add .NET assemblies to the GAC
    Use the following Post-Build step:
    “C:Program FilesMicrosoft Visual
     Studio 8SDKv2.0Bingacutil.exe” /i “$
     (TargetPath)” /F
#7 – Never Overlook Free Sample Code
 BizTalk Help file documents over 50 sample
  applications & scripts installed in the SDK
  directory:
       Program FilesMicrosoft BizTalk Server 2006SDKSamples
 30 more useful applications:
       msdn2.microsoft.com/en-us/biztalk/aa937647.aspx
 Blogger’s Guide to BizTalk (Alan Smith):
  http://www.codeplex.com/BloggersGuideBizTalk/Release/ProjectReleas
  es.aspx?ReleaseId=5353
 Your BrizTalk portal!!
       http://www.briztalk.org
#8 – Debug XSLT in Visual Studio
 Doesn’t require BizTalk to be installed!
 Debug transforms at runtime:
   Set breakpoints
   Examine local variables
   Inspect the call stack
   Step into XLST script

 Right click in XSLT display screen (not the
  filename in Sol. Explorer!) to set the input
  document
#8 – Debug XSLT in Visual Studio
More Tips
 Avoid BizTalk Explorer in BizTalk Server
  2006
 Never click Deploy at the Project level in
  Visual Studio 2005 Solution Explorer
 Beware copying schemas from one project to
  another (must edit the namespaces)
 Never use “Quick Promote”
 Keep maps out of orchestrations wherever
  possible
Summary
 Think “Loose Coupling”
   Expose external schemas only
   Use multi-part messages
   Use Direct Bound ports

 Use all available resources
   Samples in SDK
   Blogs, etc
   VS debugging tools
References
   An XML Guru’s Guide to BizTalk Server 2004 (Aaron Skonnard)
    http://msdn2.microsoft.com/en-gb/magazine/cc163712.aspx (Part 1)
    http://msdn2.microsoft.com/en-gb/magazine/cc163695.aspx (Part 2)

   BizTalk Webcasts on MSDN
    http://msdn2.microsoft.com/en-us/biztalk/aa937645.aspx

   How Messages Work in BizTalk 2004 Orchestrations (Charles Young)
    http://geekswithblogs.net/cyoung/articles/4634.aspx

   The Seven Habits of Highly Effective BizTalkers (Alan Smith)
    http://geekswithblogs.com/asmith/articles/17333.aspx

   BizTalk Naming Conventions (Scott Colestock)
    http://traceofthought.net/misc/BizTalk%20Naming%20Conventions.htm

   A Messaging-Based State Machine Design Pattern (Brian Loesgen)
    http://geekswithblogs.net/bloesgen/archive/2005/10/27/58364.aspx

   Demystifying Direct Bound Ports (Kevin Lam)
    http://blogs.msdn.com/kevin_lam/archive/2006/04/18/578572.aspx
Questions?

Más contenido relacionado

La actualidad más candente

Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1
WSO2
 
WSO2Con2011: Using WSO2 ESB with SAP ERP (Retail)
WSO2Con2011: Using WSO2 ESB with SAP ERP (Retail)WSO2Con2011: Using WSO2 ESB with SAP ERP (Retail)
WSO2Con2011: Using WSO2 ESB with SAP ERP (Retail)
WSO2
 
1. WCF Services - Exam 70-487
1. WCF Services - Exam 70-4871. WCF Services - Exam 70-487
1. WCF Services - Exam 70-487
Bat Programmer
 

La actualidad más candente (15)

OUGF OSGi/Flex
OUGF OSGi/FlexOUGF OSGi/Flex
OUGF OSGi/Flex
 
Magento 2: A technical overview
Magento 2: A technical overviewMagento 2: A technical overview
Magento 2: A technical overview
 
Dotnetfest forget about http
Dotnetfest   forget about httpDotnetfest   forget about http
Dotnetfest forget about http
 
IAS for IBM WebSphere MQ Users
IAS for IBM WebSphere MQ UsersIAS for IBM WebSphere MQ Users
IAS for IBM WebSphere MQ Users
 
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
MuleSoft Surat Virtual Meetup#33 - Unleash the power of Anypoint MQ and DLQ
 
Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1
 
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid itIgor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
 
World Wide Web
World Wide WebWorld Wide Web
World Wide Web
 
JDBC
JDBCJDBC
JDBC
 
ASP.NET Basics
ASP.NET Basics ASP.NET Basics
ASP.NET Basics
 
WSO2Con2011: Using WSO2 ESB with SAP ERP (Retail)
WSO2Con2011: Using WSO2 ESB with SAP ERP (Retail)WSO2Con2011: Using WSO2 ESB with SAP ERP (Retail)
WSO2Con2011: Using WSO2 ESB with SAP ERP (Retail)
 
1. WCF Services - Exam 70-487
1. WCF Services - Exam 70-4871. WCF Services - Exam 70-487
1. WCF Services - Exam 70-487
 
Resilient Enterprise Messaging with WSO2 ESB
Resilient Enterprise Messaging with WSO2 ESBResilient Enterprise Messaging with WSO2 ESB
Resilient Enterprise Messaging with WSO2 ESB
 
UCSY CS Club Week2
UCSY CS Club Week2UCSY CS Club Week2
UCSY CS Club Week2
 
WCF tutorial
WCF tutorialWCF tutorial
WCF tutorial
 

Destacado

Biz Talk Demo slideshare
Biz Talk Demo slideshareBiz Talk Demo slideshare
Biz Talk Demo slideshare
erios
 
Artefactos biz talk 2006
Artefactos biz talk 2006Artefactos biz talk 2006
Artefactos biz talk 2006
Sandro Pereira
 

Destacado (10)

BizTalk Practical Course Session 1
BizTalk Practical Course Session 1BizTalk Practical Course Session 1
BizTalk Practical Course Session 1
 
Monitoring and Management of BizTalk Server - using BizTalk360
Monitoring and Management of BizTalk Server - using BizTalk360Monitoring and Management of BizTalk Server - using BizTalk360
Monitoring and Management of BizTalk Server - using BizTalk360
 
BizTalk Application Deployment
BizTalk Application DeploymentBizTalk Application Deployment
BizTalk Application Deployment
 
Biz Talk Demo slideshare
Biz Talk Demo slideshareBiz Talk Demo slideshare
Biz Talk Demo slideshare
 
Artefactos biz talk 2006
Artefactos biz talk 2006Artefactos biz talk 2006
Artefactos biz talk 2006
 
TechEd - 2008 : BizTalk RFID PPT
TechEd - 2008 :  BizTalk RFID PPTTechEd - 2008 :  BizTalk RFID PPT
TechEd - 2008 : BizTalk RFID PPT
 
Top 10 BizTalk Admin Tips
Top 10 BizTalk Admin TipsTop 10 BizTalk Admin Tips
Top 10 BizTalk Admin Tips
 
Highly Available BizTalk
Highly Available BizTalkHighly Available BizTalk
Highly Available BizTalk
 
Integration Practice: How to make BizTalk Practice more profitable?
Integration Practice: How to make BizTalk Practice more profitable?Integration Practice: How to make BizTalk Practice more profitable?
Integration Practice: How to make BizTalk Practice more profitable?
 
BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)
BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)
BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)
 

Similar a 8 Tips & Tricks for Better BizTalk Programming

Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
LiquidHub
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
Jeff Blankenburg
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan
 
Bri forum advanced web interface customizations
Bri forum   advanced web interface customizationsBri forum   advanced web interface customizations
Bri forum advanced web interface customizations
CCOSTAN
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
Clint Edmonson
 
Tycs sem 5 asp.net notes unit 1 2 3 4 (2017)
Tycs sem 5 asp.net notes unit 1 2 3 4 (2017)Tycs sem 5 asp.net notes unit 1 2 3 4 (2017)
Tycs sem 5 asp.net notes unit 1 2 3 4 (2017)
WE-IT TUTORIALS
 

Similar a 8 Tips & Tricks for Better BizTalk Programming (20)

Isset Presentation @ EECI2009
Isset Presentation @ EECI2009Isset Presentation @ EECI2009
Isset Presentation @ EECI2009
 
Why meteor
Why meteorWhy meteor
Why meteor
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
 
Lotus Domino 8.5
Lotus Domino 8.5Lotus Domino 8.5
Lotus Domino 8.5
 
Migration from ASP to ASP.NET
Migration from ASP to ASP.NETMigration from ASP to ASP.NET
Migration from ASP to ASP.NET
 
Biztalk Server 2010: Introdução
Biztalk Server 2010: IntroduçãoBiztalk Server 2010: Introdução
Biztalk Server 2010: Introdução
 
Visual studio
Visual studioVisual studio
Visual studio
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxUnit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
 
Readme
ReadmeReadme
Readme
 
Bri forum advanced web interface customizations
Bri forum   advanced web interface customizationsBri forum   advanced web interface customizations
Bri forum advanced web interface customizations
 
SAP integration sample payloads for Azure Logic Apps
SAP integration sample payloads for Azure Logic AppsSAP integration sample payloads for Azure Logic Apps
SAP integration sample payloads for Azure Logic Apps
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 
Bt0082 visual basic
Bt0082 visual basicBt0082 visual basic
Bt0082 visual basic
 
Build your first DApp using Substrate Framework - Part I
Build your first DApp using Substrate Framework - Part IBuild your first DApp using Substrate Framework - Part I
Build your first DApp using Substrate Framework - Part I
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
 
Tycs sem 5 asp.net notes unit 1 2 3 4 (2017)
Tycs sem 5 asp.net notes unit 1 2 3 4 (2017)Tycs sem 5 asp.net notes unit 1 2 3 4 (2017)
Tycs sem 5 asp.net notes unit 1 2 3 4 (2017)
 
Asp.net
Asp.netAsp.net
Asp.net
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
 

Más de Daniel Toomey

Más de Daniel Toomey (20)

Microsoft Azure News - May 2024 - BAUG'24
Microsoft Azure News - May 2024 - BAUG'24Microsoft Azure News - May 2024 - BAUG'24
Microsoft Azure News - May 2024 - BAUG'24
 
Azure Logic Apps and Copilot.pptx .
Azure Logic Apps and Copilot.pptx      .Azure Logic Apps and Copilot.pptx      .
Azure Logic Apps and Copilot.pptx .
 
Microsoft Azure News - April 2024 .
Microsoft Azure News - April 2024      .Microsoft Azure News - April 2024      .
Microsoft Azure News - April 2024 .
 
Microsoft Azure News - Feb 2024
Microsoft Azure News - Feb 2024Microsoft Azure News - Feb 2024
Microsoft Azure News - Feb 2024
 
Microsoft Azure News - Dec 2023
Microsoft Azure News - Dec 2023Microsoft Azure News - Dec 2023
Microsoft Azure News - Dec 2023
 
Microsoft Azure News - Nov 2023
Microsoft Azure News - Nov 2023Microsoft Azure News - Nov 2023
Microsoft Azure News - Nov 2023
 
Microsoft AzureNews - Oct 2023
Microsoft AzureNews - Oct 2023Microsoft AzureNews - Oct 2023
Microsoft AzureNews - Oct 2023
 
Microsoft Azure New - Sep 2023
Microsoft Azure New - Sep 2023Microsoft Azure New - Sep 2023
Microsoft Azure New - Sep 2023
 
Microsoft Azure News - Aug 2023
Microsoft Azure News - Aug 2023Microsoft Azure News - Aug 2023
Microsoft Azure News - Aug 2023
 
Private DNS Infrastructure Support in Hybrid Scenarios
Private DNS Infrastructure Support in Hybrid ScenariosPrivate DNS Infrastructure Support in Hybrid Scenarios
Private DNS Infrastructure Support in Hybrid Scenarios
 
Microsoft Azure News - Jul 2023
Microsoft Azure News - Jul 2023Microsoft Azure News - Jul 2023
Microsoft Azure News - Jul 2023
 
Microsoft Azure News - Jun 2023
Microsoft Azure News - Jun 2023Microsoft Azure News - Jun 2023
Microsoft Azure News - Jun 2023
 
Microsoft Azure News - May 2023
Microsoft Azure News - May 2023Microsoft Azure News - May 2023
Microsoft Azure News - May 2023
 
Microsoft Azure News - Apr 2023
Microsoft Azure News - Apr 2023Microsoft Azure News - Apr 2023
Microsoft Azure News - Apr 2023
 
Microsoft Azure News - Mar 2023
Microsoft Azure News - Mar 2023Microsoft Azure News - Mar 2023
Microsoft Azure News - Mar 2023
 
Microsoft Azure News - Feb 2023
Microsoft Azure News - Feb 2023Microsoft Azure News - Feb 2023
Microsoft Azure News - Feb 2023
 
Microsoft Azure News - Jan 2023
Microsoft Azure News - Jan 2023Microsoft Azure News - Jan 2023
Microsoft Azure News - Jan 2023
 
Microsoft Azure News - Dec 2022
Microsoft Azure News - Dec 2022Microsoft Azure News - Dec 2022
Microsoft Azure News - Dec 2022
 
Microsoft Azure News - Nov 2022
Microsoft Azure News - Nov 2022Microsoft Azure News - Nov 2022
Microsoft Azure News - Nov 2022
 
Microsoft Azure News - Oct 2022
Microsoft Azure News - Oct 2022Microsoft Azure News - Oct 2022
Microsoft Azure News - Oct 2022
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

8 Tips & Tricks for Better BizTalk Programming

  • 1. 8 Tips & Tricks for Better BizTalk Programming Based on an MSDN article by Marty Wasznicky & Scott Zimmerman Daniel Toomey presenter
  • 2. Credits  Marty Wasznicky (MCSE, MCSD, MCDBA, MCTS) is the Regional Program Manager for BizTalk Server in the Microsoft Connected System Division. He helps customers and Microsoft Partners adopt and implement Microsoft solutions in this space. Currently, he is working on Software Oriented Architecture and Enterprise Service Bus technologies. He lives with his wife in Los Angeles.  Scott Zimmerman (MCSD, MCTS) is a senior application development consultant with Microsoft specializing in BizTalk and .NET. He has won two awards for Web service design and the Overall World Frisbee Championship eight times. He lives with his wife Vera in Washington, D.C.
  • 3. The Article “8 Tips and Tricks for Better BizTalk Programming” http://msdn2.microsoft.com/en-gb/magazine/cc163423.aspx Discusses:  Multi-Part Messages  Direct-Bound Ports  Creating Web Services  Debugging XSLT
  • 4. The Tips 1. Always use multi-part messages 2. Always try to design orchestrations with direct- bound ports 3. Always use separate internal and external schemas 4. Never expose your internal schemas directly in WSDL 5. Always optimise the BizTalk registry for Web Services 6. Always set the assembly key file with a relative path 7. Never overlook free sample code 8. Debug XSLT in Visual Studio
  • 5. #1 – Always Use Multi-Part Messages  Most messages in BizTalk are schema-based  What if the schema changes?  Not too bad, unless send/receive shapes use it:  Property value is not valid: One or more Send or Receive actions are connected to Ports and are using this Message. Please disconnect the actions before changing the Message Type.  Process to change schema bound to ports: 1. Find all send/receive shapes using message 2. Delete the relevant port connections 3. Change MessageType property on message variable 4. Reset the operation’s MessageType property on all relevant port types
  • 6. #1 – Always Use Multi-Part Messages  Solved by a level of indirection  Multi-Part message type can wrap the underlying schema  Create a new Multi-Part Message type  Set the message part to the original schema  Name it appropriately (don’t use “body”!)  Set the Message Body Part property = true  Create messages based on this type  Ports and send/receive shapes can now use multi- part message type  Allows underlying schema changes (change the part definition) without breaking the port links
  • 8. #2 – Use Direct-Bound Ports Port Options in the Orchestration Designer Port Configuration Wizard
  • 9. #2 – Use Direct-Bound Ports  Binding: Physical & Logical Port Types Create This Physical Port Type For This Logical Port Type Static One-Way One-Way / Receive or Send / Specify Later Static Solicit-Response Request-Response / Send Port / Specify Later Dynamic One-Way One-Way / Send Port / Dynamic Dynamic Solicit-Response Request-Response / Send Port / Dynamic
  • 10. #2 – Use Direct-Bound Ports  For BizTalk to BizTalk communication (not Web)  No physical ports required  3 Types to choose from:  Message Box Routing  By subscription (message type)  Complete independence  Watch out for infinite loops!  Self-Correlating  Share a port type between orchestrations (parameter)  Not necessarily dependant on message type (can use message type of XmlDocument)  Orchestration-to-Orchestration  Wiring up two known solutions  Not as loosely coupled as Message Box Routing
  • 11. #2 – Use Direct-Bound Ports  Avoiding Infinite Loops:  Don’t send the same message type that your sending service is subscribing to!  Copy message to a new type, or…  Change value of a promoted property and use a filter:  BTS.MessageType == “http://MyInternalSchemas.MyProject#MyRo otNode” AND inbound_message(status) != 1  …or, set operation-based subscription filter on receive shape (i.e. BTS.Operation != <one in orchestration>)  Caveat: Operation property not set until message passes through at least one orchestration(?)
  • 12. #3 – Always Use Separate Internal & External Schemas  Canonical schemas provide flexibility  Insulates against changes from a 3rd party  Altering fields or properties used in routing  Modifying promoted properties  Separate assemblies for schemas & maps makes re-deployment easier  Can reduce number of maps required  Combine multiple inbound schemas to one canonical schema  Map canonical schema to outbound schemas
  • 13. #4 – Never Expose Your Internal Schemas in WSDL  BizTalk Web Services Publishing Wizard:
  • 14. #4 – Never Expose Your Internal Schemas in WSDL  Loose coupling  Freedom to change orchestration without breaking the caller  Preserves external interface  Need to define and build the schemas assembly prior to running the wizard  Remember to use the externally facing schemas!  Operation names MUST match exactly (orchestration will be subscription-based on this operation name)  Use XmlReceive pipeline to create MessageType property
  • 15. #4 – Never Expose Your Internal Schemas in WSDL
  • 16. #5 - Always Optimize the BizTalk Registry for Web Services  Tweak default ASP.NET parameters  BizTalk automatically multiplies by # of CPUs  Steps to create a reusable script:  Back up your registry!!  Create a Notepad file with a .REG suffix  Copy code from next slide  Replace BTSHOST with the name of your BizTalk host (use Regedit to find key name)  Double-click the file to install
  • 17. #5 - Always Optimize the BizTalk Registry for Web Services Windows Registry Editor version 5.00 [HKEY_LOCAL_MACHINESYSTEMCurrentControl SetServicesBTSSvc$BTSHOSTCLR Hosting] “MaxIOThreads”=dword:00000064 “MaxWorkerThreads”=dword:00000064 “MinIOThreads”=dword:00000019 “MinWorkerThreads”=dword:00000019
  • 18. #5 - Always Optimize the BizTalk Registry for Web Services  Details about this and other optimisations: msdn2.microsoft.com/en-us/library/aa561380.aspx  Performance tuning for low latency messaging: msdn2.microsoft.com/en-us/library/aa475435.aspx
  • 19. #6 – Always Set the Assembly Key File with a Relative Path  Sharing solution with source control is easier  Recommendation:  Place strong name key file in same directory as the VS solution file  Create each VS project (by BizTalk artefact type) in a separate sub-folder  Orchestrations  Maps  Pipelines  Schemas  Etc  Set path for key file: "......Key.snk"
  • 20. #6 – Always Set the Assembly Key File with a Relative Path  Works differently for .NET components than for BizTalk projects  May have to hack project (*.csproj) file  Search for name of key file and apply relative path (usually only 1 parent hop)  Don’t forget to add .NET assemblies to the GAC  Use the following Post-Build step:  “C:Program FilesMicrosoft Visual Studio 8SDKv2.0Bingacutil.exe” /i “$ (TargetPath)” /F
  • 21. #7 – Never Overlook Free Sample Code  BizTalk Help file documents over 50 sample applications & scripts installed in the SDK directory: Program FilesMicrosoft BizTalk Server 2006SDKSamples  30 more useful applications: msdn2.microsoft.com/en-us/biztalk/aa937647.aspx  Blogger’s Guide to BizTalk (Alan Smith): http://www.codeplex.com/BloggersGuideBizTalk/Release/ProjectReleas es.aspx?ReleaseId=5353  Your BrizTalk portal!! http://www.briztalk.org
  • 22. #8 – Debug XSLT in Visual Studio  Doesn’t require BizTalk to be installed!  Debug transforms at runtime:  Set breakpoints  Examine local variables  Inspect the call stack  Step into XLST script  Right click in XSLT display screen (not the filename in Sol. Explorer!) to set the input document
  • 23. #8 – Debug XSLT in Visual Studio
  • 24. More Tips  Avoid BizTalk Explorer in BizTalk Server 2006  Never click Deploy at the Project level in Visual Studio 2005 Solution Explorer  Beware copying schemas from one project to another (must edit the namespaces)  Never use “Quick Promote”  Keep maps out of orchestrations wherever possible
  • 25. Summary  Think “Loose Coupling”  Expose external schemas only  Use multi-part messages  Use Direct Bound ports  Use all available resources  Samples in SDK  Blogs, etc  VS debugging tools
  • 26. References  An XML Guru’s Guide to BizTalk Server 2004 (Aaron Skonnard) http://msdn2.microsoft.com/en-gb/magazine/cc163712.aspx (Part 1) http://msdn2.microsoft.com/en-gb/magazine/cc163695.aspx (Part 2)  BizTalk Webcasts on MSDN http://msdn2.microsoft.com/en-us/biztalk/aa937645.aspx  How Messages Work in BizTalk 2004 Orchestrations (Charles Young) http://geekswithblogs.net/cyoung/articles/4634.aspx  The Seven Habits of Highly Effective BizTalkers (Alan Smith) http://geekswithblogs.com/asmith/articles/17333.aspx  BizTalk Naming Conventions (Scott Colestock) http://traceofthought.net/misc/BizTalk%20Naming%20Conventions.htm  A Messaging-Based State Machine Design Pattern (Brian Loesgen) http://geekswithblogs.net/bloesgen/archive/2005/10/27/58364.aspx  Demystifying Direct Bound Ports (Kevin Lam) http://blogs.msdn.com/kevin_lam/archive/2006/04/18/578572.aspx

Notas del editor

  1. -Walk away understanding what you need to do according to MS BP -Use referenced documentation from MS
  2. Clinical definition
  3. -Ensuring continuity of service despite outages, maintenance, etc
  4. Everything in BTS is done with messages Multi-part messages typically used for emails, web services, etc (Web Messages) Schema change that affects message type (namespace and/or root node name)
  5. - Multi-part message types can be re-used, even across multiple orchestrations within the same assembly
  6. Port Options in the Orchestration Designer Port Configuration Wizard Logical vs Physical Port Types Web Ports are more limited