BizTalk AppFabric Connect: An Introduction
[Update 21/10/2010: Made changes to the article to reflect the changes in branding and features post RTM]
In the recently released BizTalk Server 2010, we introduced a new feature of BizTalk called "AppFabric Connect”, which allows users to easily develop simple integration applications. With this feature, users can:
- Develop Windows Workflow applications that require connectivity to backend Line of Business (LOB) systems like SAP, Oracle DB, Oracle E-Business Suite, Seibel, and SQL Server without writing custom code for LOB connectivity.
- Develop XML-based data transformation using the easy-to-use and rich user interface of BizTalk Mapper that can be launched and used right within a .NET/WF project
In this blog, I will provide an overview of this feature. A more elaborate whitepaper with a tutorial can be found here.
With this feature, Windows Workflow Foundation (WF) activities are provided to the end user to programmatically access BizTalk’s LOB connectivity and data transformation capabilities. This enables users to easily create new composite applications using the WF model, which can be deployed, hosted, managed in Windows Server AppFabric. This also enables web-based applications to access LOB data. This can help a class of scenarios (such as Web-based queries) that are best effort, short running and don’t require the durability/persistence provided by traditional BizTalk Server. A typical application architecture may look like below:
Figure 1 A workflow service hosted in AppFabric/IIS connecting to a Line-of-Business system
Connecting to a Line of Business System
BizTalk provides a set of WCF based adapters that provide easy connectivity to Line of Business (LoB) systems. To use this, you need to install the WCF LoB Adapter SDK and the BizTalk Adapter Pack, which are available as part of BizTalk Server 2010 release.
To use this feature from a WF project in Visual Studio, click the “Add Adapter Service Reference…” menu item.
This brings up a dialog box (like the one below) which you can use to connect to the LoB system. The dialog box allows you to browse through the artifacts supported by the LoB system and choose the operations you want to use. For example, in the screenshot below, we use the “Select” operation on the SQL Database table “CustomerInfo”.
When you click OK, the plugin will generate WF activities for the operations you have selected. You must build your project to see the activities on the Visual Studio Toolbox (See below). Once that is done, you can simple drag-and-drop the activities to use them in your workflow.
Transforming Data using the BizTalk Mapper
BizTalk provides a rich GUI-based tool for performing data transformations for XML data. We can now use this capability to map .NET types from a WF application through the Mapper activity. You will see this activity on the Toolbox under the “BizTalk” category after you install BizTalk Server (Developer Tools) and the WCF LOB Adapter SDK.
To use this mapper activity, you need to specify the InputDataContractType and the OutputDataContractType. As the name suggests, these are .NET types for the input data and the output data for the activity. You can then create a new map or select an existing map based on these types. If you are creating a new map, the activity will generate the XML schemas for the selected input and output DataContract types and a new BizTalk map (.btm) file.
You can then open and edit the BizTalk map file in the BizTalk Mapper GUI from within the WF project itself. When the map file is saved, it will automatically be compiled and built along with the project.
The mapper activity has an input argument that takes the data to be transformed and an output argument where the transformed data is stored. You can create workflow variables to pass the input and store the output from the activity. At runtime, the input data will first be serialized into XML. It will then be transformed using XSLT generated from the map file and finally de-serialized back into an object of the output type.
With these features, developing web applications which require access to LoB data will be a lot easier. The ability to use the BizTalk Mapper for data transformation means that different data in different LoB systems can be transformed using an interactive and intuitive GUI-based tool. Windows Server AppFabric provides a hosting service to deploy and manage these applications.
We would be happy to see you try out these features in your workflow applications, and receive your feedback. You can either write to me directly (sameerch @ microsoft . com) or leave a feedback here on this blog.
Program Manager, BizTalk Server Team