SIGN UP MEMBER LOGIN:    
ARTICLE

Using C# inline on Maps in BizTalk

Posted by John Charles Olamendy Articles | BizTalk Server December 03, 2009
In this article, I will cover how to implement custom business logic (a simple string concatenation) using C# inline on maps in BizTalk.
Reader Level:

Introduction

In this article, I will cover how to implement custom business logic (a simple string concatenation) using C# inline on maps in BizTalk. This is a common scenario when the business logic is very simple and we want to embed the logic within the map.

Getting started with the solution

First of all, open Visual Studio .NET and create an empty solution. Then add an Empty Biztalk Server project (see Figure 1).
 
1.gif 

Figure 1

Now let's create two schemas which are the basis of the transformation. The first one represents the input parameters (see Figure 2) and the other one represents the output parameter (see Figure 3).
 

Figure 2
 

Figure 3

Now let's add a map representing the concatenation transformation. Set the source and destination schemas. Click on the Toolbox window, and then click on the Advanced Functoids tab, and drag and drop the Scripting functoid onto the map surface. This functoid's input and output values are dependent of the logic contained within the Scripting functoid. Connect the left side of Scripting functoid to the appropriate source data items as well as the right side to the destination data items (see Figure 4).
 

Figure 4

Now let's configure the Scripting functoid by right-click over it and selecting Configure Functoid Script option (see Figure 5).

5.gif

Figure 5

When the Configure Functoid Script dialog is displayed, select Inline C# for Script Type. Then enter the business logic written in C# in the Inline script buffer textbox (see Figure 6).
 
6.gif

Figure 6

Conclusion

In this article, I covered how to embed inline C# code in the map in order to implement business logic related to the transformation. Now you can apply this solution to your business scenario.

Login to add your contents and source code to this article
share this article :
post comment
 
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Gauge for SharePoint
Become a Sponsor