‘Thank you’ to all who attended last Thursday’s Twin Cities BizTalk User Group. You can get the ‘Orchestration Concepts: Message Construction, Direct Binding and Configuration’ presentation here. For those that were not at the presentation, note that the ‘Configuration’ section of this presentation focused on Orchestration Engine configuration and not configuration of applications running in BizTalk.
I packaged each demo’s source code into its own .zip file so they could be used as samples. ‘Readme’ notes on how to setup the samples, ‘reproduce’ the demos and what to look at to get the most out of the samples can be found later in this post.
Here are links to the samples:
Note that the source code and readme.txt files can be used only with BizTalk 2006 (Beta 2) although only the ‘Calling Pipeline from Orchestration’ functionality will not work in BizTalk 2004 as the functionality does not exist in that release. If you are interested in 2004 samples request them through this blog.
If you would like more information on Direct Binding I suggest examining Charles Young’s Direct Binding article which you can fine here. There is also information on Direct Binding in Matt Milner’s ‘BizTalk Server 2004: A Messaging Engine Overview’ article.
---
Sample’s ‘ReadMe’ Notes
Call Pipeline from Orchestration:
- This sample shows how to call a send pipeline from an orchestration that aggregates two document messages into an envelope message.
- Review the CallPipeline.odx orchestration. This orchestration:
- Aggregates to instances based on MyItem.xsd into and instance of MyEnvelope.xsd using a custom Send Pipeline.
- Note the use of the Microsoft.XLANGs.Pipeline.SendPipelineInputMessages class to collect the item messages.
- Note the use of the Microsoft.XLANGs.Pipeline.XLANGPipelineManager class to call the custom pipeline.
- Create a Receive Port and Receive Location using the File Adapter and bind that port to the CallPipeline.odx’s logical Receive Port (the .zip file contains an ‘In’ directory that could be used for this.)
- Create a Send Port using the File Adapter and bind that port to the CallPipeline.odx’s logical Send Port (the .zip file contains an ‘Out’ directory that could be used for this.)
- Deploy the sample.
- Start the orchestration and receive location and send port.
- Copy and paste the ‘First MyItem.xml’ document into the Receive Location’s directory.
- Examine the output in the Send Port’s output directory to see that it contains two MyItem.xsd instances (although they are identical) within the MyEnvelope.xsd instance.
Orchestration Engine Configuration:
- This sample shows how to configure the orchestration engine to turn schema validation on, how to use AppDomain assignment and how to retrieve a value from BTSNTSvc.exe.config. The BTSNTSvc.exe.config file is the key to this sample.
- Review the Orchestration1.odx orchestration
- This orchestration uses System.Configuration.Trace.WriteLine to write to the Trace output.
- It traces the hosting AppDomain name.
- It traces a configuration key value.
- It assigns an invalid xml instance to a message
- It traces a final message signifying the orchestration is over.
- Create a Receive Port and Receive Location using the File Adapter and bind that port to the Orchestration1.odx’s logical Receive Port (the .zip file contains an ‘In’ directory that could be used for this.)
- Obtain DebugView from www.sysinternals.com if you don’t already have it.
- Deploy the sample.
- Start the orchestration and port.
- Start DebugView.
- Copy and paste the ‘ConfigurationSchema_output.xml’ document into the Receive Location’s directory.
- Note the output in DebugView.
- Replace your version of the BTSNTSvc.exe.config with the version included with this sample.
- Restart the host instance.
- Note the output in DebugView.
Partner (Port) Direct Binding Sample:
· This sample shows how to use (inverse) partner (port) direct binding to associate four orchestrations. The subscriptions created based on the Partner Ports are the key to this sample.
· Review the Orchestration1.odx orchestration
o Note that the logical send port’s Partner Orchestration Port value is pointed to itself.
· Review the Orchestration2.odx and Orchestration3.odx orchestrations
o Note that the logical receive ports’ Partner Orchestration Port value is pointed to the Orchestration1.odx logical send port.
· Review the Orchestration4.odx orchestrations
o Note that the logical receive port’s Partner Orchestration Port value is pointed to the Orchestration1.odx logical send port.
o Also note that a filter is applied to the receive shape for a bogus ReceivePortName which prevents instances of this orchestration from being created in this sample (this shows how you could develop complex orchestration relationships that still depend on runtime values for process flow and routing.)
· Create a Receive Port and Receive Location using the File Adapter and bind that port to the Orchestration1.odx’s logical Receive Port (the .zip file contains an ‘In’ directory that could be used for this.)
· (Optional) Obtain DebugView from www.sysinternals.com if you don’t already have it.
· Deploy the sample.
· Note the subscriptions created for this sample
o Open the BizTalk Server Administration
o Click on the BizTalk Group node
o Click on the New Query tab
o Change the ‘Search For’ value to ‘Subscriptions’
o Click the ‘Run Query’ button.
o Find the subscriptions that were created based on this sample (refer to the presentation for clues)
· Start the orchestrations and receive location.
· (Optional) Start DebugView.
· Copy and paste the ‘PartnerPortSchema_output.xml’ document into the Receive Location’s directory.
· (Optional) Note the output in DebugView.
· (Extra) Stop (change them to only be Enlisted) Orchestration2.odx and Orchestration3.odx. After kicking off Orchestration1.odx use BizTalk Server Administration to view the context properties of the message it sends to the Message Box database.
Self-Correlated Direct Binding:
- This sample shows how to use Self-Correlated Direct Binding to route a process flow back to an originating orchestration. Note that this sample also uses Message Box Direct Binding.
- Review the Orchestration1.odx orchestration
- Note that the logical send port’s Partner Orchestration Port value is ‘Self-Correlated’
- Review the Orchestration2.odx orchestration
- Note that the logical receive port’s Partner Orchestration Port value is ‘Message Box’ which allows it to receive all messages type as SelfCorrelating.SelfCorrelatingSchema2 (if their BTS.MessageType property is promoted.)
- Note the usage of Correlation_1 to promote the CorrelationToken property to promoted the CorrelationToken property (when this property is written to the outbound message from Orchestration1.odx is it only written so that it doesn’t match the instance subscription created for the ‘Response’ portion of the port.)
- Note that the Send Port’s Partner Orchestration Port value is ‘Self-Correlated’. Does it need to be?
- Create a Receive Port and Receive Location using the File Adapter and bind that port to the Orchestration1.odx’s logical Receive Port (the .zip file contains an ‘In’ directory that could be used for this.)
- (Optional) Obtain DebugView from www.sysinternals.com if you don’t already have it.
- Deploy the sample.
- Start the orchestrations and the receive location.
- Enlist but do not start Orchestration2.odx.
- Copy and paste the ‘SelfCorrelatingSchema_output.xml’ document into the Receive Location’s directory.
- Note the instance subscriptions created for this sample
- Open the BizTalk Server Administration
- Click on the BizTalk Group node
- Click on the New Query tab
- Change the ‘Search For’ value to ‘Subscriptions’
- Click the ‘Run Query’ button.
- Find the subscriptions that were created based on this sample (refer to the presentation for clues); look for instance subscriptions.
- Find the message sent from Orchestration1.odx and note that it has a CorrelationToken property that is ‘Not Promoted’.
Print | posted on Sunday, March 19, 2006 12:21 PM