Skip to main content

BizTalk Server 2009 Code Samples

These samples for BizTalk Server 2009 code demonstrate significant features of the Microsoft BizTalk Server 2009 release. These include EDI/AS2, the Windows Communication Foundation (WCF) adapters, and the BAM (Business Activity Monitoring) Interceptor. There are also samples demonstrating the Business Rule Engine (BRE), orchestrations, and Web services.

BAM Interceptor

Using the BAM WCF Interceptor with Multiple Endpoints

Configure an existing WCF application to capture data for the BAM activity to the BAM Primary Import database using the BAM WCF Interceptor.

Using the BAM Windows Workflow Foundation Interceptor

Configure an existing Windows Workflow Foundation (WF) application to capture data for the BAM activity in the BAM Primary Import database using the BAM WF Interceptor.

Business Rules

Handling Optional Elements in Business Rules

Handle an optional element from an XML schema, in which no error is raised when a message is submitted without the optional element at run time.

Deploying Business Rules Programmatically

Use the FileRuleStore, SqlRuleStore, and RuleSetDeploymentDriver classes to automate importing, exporting, deploying, undeploying, and removing policies. This sample is created as a console application, so that you can easily use the tool from a batch file or a script file to automate importing, exporting, deploying, undeploying, and removing policies.

Analyzing Objects of the Same Type in a Business Rule

Use the rules engine to simultaneously analyze and act upon each instance of a .NET type that is asserted into the engine.

EDI and AS2

Using a Custom Pipeline Component for EDI Party Resolution

Use EDI party resolution to resolve EDI interchanges to a party, and to process the interchange according to defined EDI properties for the party. Use AS/2 encryption and compression to transfer data efficiently and safely over public networks.

Orchestration

Orchestration Recovery

Explains compensation and forward recovery from persisted state, and uses several orchestrations to demonstrate the different options and benefits.

Web Services

Consuming Web Services Using the SOAP Adapter

Consume a simple Web service without an orchestration by using the SOAP adapter and BizTalk multi-part messaging.

WCF Adapters

Using Custom Behaviors with the BizTalk WCF Adapters

Extend WCF services through custom behaviors and the WCF adapters.

Using a Custom Behavior to Secure a Receive Location with the WCF Adapters

Secure access to a BizTalk receive location by using a custom authorization behavior with the WCF adapters.

Using a Pipeline Intermediary with the WCF Adapters

Use an intermediary BizTalk Server custom pipeline to dynamically channel an incoming WCF client call to the correct version of a WCF service.

Using Transactions with Message Interception and the WCF Adapters

Custom message interception during BizTalk Server’s binding processing of an outgoing WCF message.

Using BizTalk Server Messaging with the WCF Adapters

Use BizTalk Server messaging and the WCF adapters to send WCF messages from a WCF client application to a WCF service.

Using Dynamic Send Ports with the WCF Adapters

Configure dynamic send ports by using WCF adapter context properties for the WCF-NetTcp transport and for the WCF-Custom transport with the WCF-NetTcp binding.

Handling Exceptions in Orchestrations with the WCF Adapters

Handle typed fault exceptions in orchestrations.

Using Custom SOAP Headers with the WCF Adapters

Access custom SOAP headers in inbound WCF messages, and add custom SOAP headers to outbound WCF messages.

Programmatically Submitting a WCF Message Using the WCF Adapters

Submit a WCF message to an orchestration exposed as a WCF service. The WCF adapter uses an XPath command to extract specific SOAP property elements from the incoming message.

Using the Messages Tab with the WCF Adapters

Use the Messages tab in the Transport Properties dialog box of a WCF adapter to control which part of an incoming WCF message is mapped to the body of the resulting BizTalk message.

WCF Adapter Walkthroughs

Get sample code for the WCF adapter walkthroughs outlined in the WCF Adapter Walkthroughs topic of the MSDN Library.

BizTalk RFID

Event Handler Template

Write event handlers using the Visual Studio template that ships with this sample.

Duplicate Tag Elimination

Eliminate duplicates from TagReadEvents and TagListEvents.

BRE Event Handler

Invoke a Business Rule Engine (BRE) policy by using the RuleEnginePolicyExecutor event handler in an RFID process.

Event Cycle Event Handler

Collect a set of TagReadEvents in an event cycle using this RFID process with an event handler. Within the event cycle, duplicates are automatically filtered.

Consume WCF Service

Post a TagReadEvent as a message to a Windows Communication Foundation (WCF) service.

Using BizTalk SQL Adapter in Receive-only Scenario

Receive tag data from the RFIDsink database by executing the GetAndDeleteEventsForBizTalk stored procedure.

Using BizTalk SQL Adapter in Request-Response Scenario

Send a request to execute the GetTagReadEventsWithTimeFilter stored procedure.

Using Web Service Proxies Exposed by BizTalk RFID

Use the Web service proxies exposed by the Microsoft.Rfid.ManagementWebServiceProxies assembly that ships with BizTalk RFID.

Using WCF Service Exposed by a BizTalk Orchestration

Expose a BizTalk orchestration as a WCF service, and consume the WCF service from a BizTalk RFID process.

Provider Template

Write Device Service Provider Interface (DSPI) for device providers by using the Visual Studio template that ships with this sample.

Import Export Rule Store

Import Business Rule Engine (BRE) policies and vocabularies from an XML file into the Rule Engine database, and export policies and vocabularies from the Rule Engine database to an XML file.

Synchronous Commands

Issue a set of commands to BizTalk RFID from a Windows Forms application by using the object model (OM) exposed by BizTalk RFID.

BizTalk RFID Standards Pack Tag Data Translator Sample

Use the Encode, Decode and Translate operations (based on the EPC global ratified standard) from BizTalk RFID applications.

BizTalk RFID Standards Pack LLRP Extended Provider

Write a provider that supports LLRP vendor extensions.

BizTalk RFID Standards Pack Web Services Discovery Provider

Create a sample discovery provider, using the Microsoft BizTalk RFID discovery library in this Microsoft Visual C# sample.

BizTalk RFID Standards Pack Web Services Discovery Simulator

Simulate messages sent by a BizTalk RFID device with this discovery sample. Send Hello messages, and respond to a probe from a provider with a ProbeMatch message.

BizTalk RFID Mobile CE Provider Template

Write DSPI device providers for BizTalk RFID Mobile using the Visual Studio 2005 CE Provider template.

BizTalk RFID Mobile My First CE Provider

Create a sample Visual Studio CE DSPI device provider by using this Visual Studio C# sample.

BizTalk RFID Mobile Read Tags Application

See the features of the BizTalk RFID Mobile platform.

EPCIS Transform Event Handler

Create a custom event handler component to transform BizTalk RFID Event types into EPCIS Events.

MSMQ Event Handler

Create a custom event handler component to send RFID event data and EPCIS event data to an MSMQ queue by using this Visual C# sample.

Read Filter

Create and evaluate a filter evaluation tree with one or more filter combinations, and implement read filters that can filter incoming tags by using this Visual C# sample.