Posts

Showing posts from 2010

SharePoint Adapter in BizTalk Server

Image
In this post I would like to show how to insert records to SharePoint using BizTalk Server 2010
Scenario: At the end of demonstration I will put XML file to a folder which will be transfered to SharePoint list
first you need to install SharePoint Server 2010 or SharePoint Foundation


I will choose standalone installation option.
When installation process will finish I will select to configure SharePoint and setup a web site which will use for exporting data You will need that web site later when configuring BizTalk
When SharePoint configuration will finish Start BizTalk installation wizard in case if you have already installed BizTalk choose Modify option and check just SharePoint option
When installation will complete, start BizTalk Server Configuration Wizard Choose SharePoint Adapter from Options and check Enable Windows SharePoint Services Adapter on this Computer
Without SharePint installation these options will be disabled.
Add your BizTalk service account to newly created SharePoint Enabled Ho…

New domain, new content

Dear Readersince I have decided to enhance main theme of my blog which will be aimed now to enterprise applications development and will include BizTalk, AppFabric, Azure/Cloud solutions and other technologies the blog is moved to www.EnterpriseApplicationsDevelopment.com
Thank you for reading my blog!

SOA Glossary

Many times I was asked to explain different SOA related terms.In this I would to recommend www.soaglossary.com web site where you can find complete list of term related SOA field.
I would like also announce (after short silence) new chapter in my blog which will be about new features of BizTalk 2010 , Windows Server AppFabric. May be will be some posts about SOA and Azure technologies.

BizTalk 2010 RTM

BizTalk 2010 RTM was released Will be available for purchase from 1st October

Developer edition is free !! get it
For more information and trial download check this page

Message lost, or how to route failed messages

Image
In some cases message can be "lost" while it is processing by pipeline, the reason can be damaged XML format or unexpected error. So you will not be able to find the lost message in Failed Messages (Group Hub)in Event Viewer you will find something like

There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "ReceivePort1" URI: "C:\Temp\rcv\*.txt" Reason: No Disassemble stage components can recognize the data.

To solve the problem you should enable routing for failed messages in receive port
Then create a send port which will filter all failed messages for you

Applied Architecture Patterns on the Microsoft Platform

New book was published by my favorite BizTalk guru , it will be interesting not only for BizTalk developers.
What you will learn from the book :
How to organize your evaluation of candidate solutions to a given business problemReview the new features in WCF and Workflow that are available in .NET 4.0Explore the hosting of WCF and Workflow solutions in Windows Server AppFabric and dive deeper into the best usage scenarios for these frameworksLook at the core components and compelling aspects of BizTalk Server 2010See where to use the data movement, master data management and data governance of SQL Server Integration Services, Microsoft Sync Framework, and SQL Server Service BrokerHow to determine when to use BizTalk Server versus Windows Workflow for workflow applications and BizTalk Server versus SQL Server when sharing dataWalk through developing your first Windows Azure Platform AppFabric, and SQL Azure applications and get an overview of each of the components of the Windows Azure Pl…

Armenian .NET professional developers group

I invite you to join Armenian .NET developers and experts group at LinkedIn

Message Box cleanup

It is usually a very important task to clean up a BizTalk mseeage box during stress testing with large amount of messages. Below are the steps to clean up the message box in order to prepare for the new test.
1. Stop all BizTalk services
2. Type iisreset at command line to recycle IIS service
3. Execute the stored procedure bts_CleanupMsgbox on your message box database
4. Execute the stroed procedure bts_PurgeSubscriptions on your message box database
(if the above stored procedures can't be found, go to your BizTalk installation directory, under “Schema” folder, you can find all original scripts of these stored procedures)
5. Clean up the message box log by running the backup statement similar to below
backup log msgBoxDb to disk = 'yourbackupdirectory\yourbackupfile.bak' with init, stats = 5
6. Restart BizTalk services

Exception handling in Orchestrations

Image
I am back from WPC with lot of news, so soon will publish new articles about BizTalk Server 2010 and will include posts about AppFabric which will become a part of Windows Server in future releases and (it seems to me) will be tightly coupled with BizTalk Server
At this post I would like to explain error handling in orchestrations and show how to make it with divide by zero exception.
1. first of all create new scope which will be the equivalent to try in .NET 2. add expression to scope 3. set expression to V = 6; V = 5 / (6-V); // this line with throw divide by zero exception where V is a decimal variable in orchestration 4. Right click on the scope and add exception block 5. Set
Exception Object Type to System.ArithmeticException Exception Object Name to Ex 6. In exception block add Construct Message shape which will hold error description 7. Add Message Assignment shape to Construct Message shape 8. Set assignment expression to Message_3 = new System.Xml.XmlDocument(); Message_3.LoadXml("…

Let's meet at WPC in Washington DC

It will be great to meet SOA and BI professionals in Washington DC at WPCwhich will take place on July 11- July 15
http://digitalwpc.com/

BAM Archiving is not installed on the local machine

While configuring BAM for BizTalk Server 2009 in multi server environment I have faced this problem
TITLE: Microsoft BizTalk Server 2009 Configuration Wizard ------------------------------
Microsoft SQL Server 2008 Data Transformation Services (DTS) for BAM Archiving is not installed on the local machine. Please install Microsoft SQL Server 2008 Integration Services. (Microsoft.BizTalk.Bam.CfgExtHelper.ToolsHelper)
For help, click: http://go.microsoft.com/fwlink/events.asp?ProdName=Microsoft+BizTalk+Server+2009&ProdVer=3.8.368.0&EvtSrc=Microsoft.BizTalk.Bam.CfgExtHelper.ToolsHelper&EvtID=error_DTS2008Archive
------------------------------ ADDITIONAL INFORMATION:
Could not load file or assembly 'Microsoft.SqlServer.DTSRuntimeWrap, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. (Microsoft.SqlServer.ManagedDTS)
For help, click: http://go.microsoft.com/fwlink/events.asp?ProdName=Micros…

BizTalk Server 2010 Beta download

Using BAM for orchestration performance tuning

Image
In this post I want to demonstrate how to use BAM to investigate potential
slow nodes and processing in your orchestration.

I have created a sample orchestration which has one transformation and one correlation blocks.
So I want to check the durations of:
1. Whole orchestration 2. Transformation 3. Correlation
Let's activate BAM plugin in MS Office 2007


Now I will create a view, which then will be associated with orchestration Note that while creating view and activity I will not need BizTalk Server or a connection at all.
1. From Add-ins menu open BAM/BAM Activity 2. Click New Activity 3. Type BAMSample in Activity Name 4. Click New Item 5. Name it Orchestration Start, set item type to Business Milestone 6. Add Item Orchestration End 7. Add Item Transformation Start 8. Add Item Transformation End 9. Add Item Correlation Start 10. Add Item Correlation End
11 Click OK 12. Click Ok
Now view will be created
13. Click Next to start wizard 14. Select Create new view 15. Click Next
16. Set view name to BAM Samp…

New BizTalk Server 2009 course for IT pros is released!

The course is available for download on Courseware web site

For details check:
http://www.microsoft.com/learning/en/us/Course.aspx?ID=50371A

Licensing Adapter Pack for BizTalk Server

Very common question!
For the first time I also thought that Adapter Pack is free ..........NO :-( it should be licensed So : 1. It is licensed per processor 2. It is not included in any other software 3. All customers can purchase it 4. Customers can purchase it through Volume Licensing Channels and on MSDN
Enjoy it :-)

New BizTalk Server 2009 course for IT

Check for new course on Courseware LibraryCourse 50371A: Deploying and Managing Business Process and Integration Solutions Using Microsoft BizTalk Server 2009This three-day instructor-led course provides students with the knowledge and skills to Deploying, Managing Business Process and Integration Solutions Using Microsoft BizTalk Server 2009. The course focuses on how to deploy and manage BizTalk applications in a production environment.Short description of the course§Describe SOA principles, interoperability and the role of BizTalk Server in your Organization.§Describe services and tools provided in BizTalk Server 2009.§Install BizTalk Server 2009 in a computer and in a multi-server environment.§Install and configure SharePoint Services.§Deploy and manage Adapter Pack.§Deploy BizTalk Server Applications to a BizTalk Server 2009 computer.§Manage port settings and troubleshoot Applications.§Manage and monitor BizTalk Server Applications on a BizTalk Server 2009 computer.§Configure po…

How to backup BizTalk Server

All settings of BizTalk Server are located in MS SQL Server
So it is enough to Backup SQL Server databases

1. Open SQL Server Management Studio
2. Expend SQL Server Agent
3. Open Jobs
4. Open properties of Backup BizTalk Server job
5. In Steps select Backup Full and press Edit
6. Set Destination to C:\BackupFolder
7. Click Next, go to MarkAndBackupLog
8. Set Destination to C:\Backupfolder
9. Click Next
10. Click Next
11. Right click on Backup BizTalk Server job
12. Select Start Job At Step
13. Click Start
14. Check if backup was successful


You can schedule backup job in properties of the Job

XML debatch in pipeline

Image
Last month I had a post were described how to debatch XML message in orchestration using XPath. http://biztalk.kirakosyan.com/2010/02/debatching-records-from-wcf-sql-using.html How I wrote it is not the best solution , in case if you will have hundreds of records the debatching using XPath will consume too much memory and processor.
In this post I am going to show how to debatch using pipeline. The sample will fetch multiple records from MS SQL database and after debatching put them to folder.
How to create simple WCF-SQL ports and SQL polling you can read in my old post http://biztalk.kirakosyan.com/2010/02/how-to-pull-database-using-wcf-sql.html I will use the same procedure and table to generate Schemas and PortTypes
In generated schema change envelop type to yes


Next click on TypePolling which is the root for schema
In properties find Body XPath
and edit it as in picture is
Then change the last node to have Max Occurs = 1
Now we should remove hidden stones :-)
When you added adapter metadata f…

Which components should install developer to enabled BizTalk Project in Visual Studio?

Image

BizTalk Server 2009 R2 -> Server 2010

BizTalk Server 2009 R2, which has not been released yet, will be known as "BizTalk Server 2010" when it rolls out sometime later this year, Microsoft announced. BizTalk Server essentially functions as a messaging component in service-oriented architectures. It's used by enterprises to help tie disparate business processes together.The new BizTalk Server 2010 name will have the effect of shifting the product's lifecycle support forward, according to John Breakwell, a Microsoft product support services team member. The shift will occur because the product is no longer associated with the current R1 and R2 nomenclature and product support timeline.Source

Correlating with two different schemas

Image
Scenario: I have a Message which should be sent to confirmation after confirmation it occurs in a folderbut the type of the message is changed
Solution: so schema of the sent message is and after confirmation the schema will be
So we are unable to correlate Field1PK with Field3PK if we use promotion with default settings
While promoting Field3PK set its name to Field1PK like

Download solution sample

Orchestration Debug with System.Diagnostics.Debug and Parallel shapes in orchestration

Image
In this post I want to show alternate method for Debug and demonstrate how Parallel shape works in orchestration.
1. Create new orchestration 2. Create first receive port 3. Insert Parallel Actions shape 4. Add to shape 2 branches 5. Add 8 Expressions
So your orchestration should look like
6. edit each expression shape Expression_1 : System.Diagnostics.Debug.WriteLine("Exp1");
Expression_2 : System.Diagnostics.Debug.WriteLine("Exp2");
Expression_3 : System.Diagnostics.Debug.WriteLine("Exp3");
Expression_4 : System.Diagnostics.Debug.WriteLine("Exp4");
================
Expression_8 : System.Diagnostics.Debug.WriteLine("Exp8");

Download DebugView Utility from http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx great tool by Mark Russinovich
Create a simple xml which will start orchestration

Start debug view Enable Capture Global Win32, Enable Verbose Kernel Output Start orchestration and check for output !

Same trick you can use in your Window appli…

BizTalk Orchestration debug

Image
You can debug your orchestration using Visual Studio by attaching it to BTSNTSvc.exe processes. The orchestration will be debugged without break point if it has Exception, in this case you will not need to setup a break point, like any desktop application which you run in debug mode. The engine will generate C# file for you were you can details of the exception.
In this post I want to show how to debug an orchestration setting a break point
I will create an orchestration which will throw an exception when dividing by 0 (Zero)
Create a simple schema where you will pass 2 numbers and another schema with 1 parameter which will hold division result.
All element should be decimal and distinguished
1. Create Receive port in orchestration 2. Create Scope 3. Add Construct message to Scope 4. Add Message assignment to constructor 5. Create Send port
Edit expression for assignment:
Variable_1.LoadXml(@"<ns0:root ns0=""http://OrchDebug.DivisionOut""><result>14.4</result…

BizTalk Feature Dependency Graph

Image
Use this graph to install prerequisites and dependencies for BizTalk Server features.

Licensing BizTalk Server

While introducing BizTalk Server to clients and students I am always asked about pricing and licensing. It is difficult enough to remember for me all licensing and pricing options. So posting and bookmarking for myself and readers a link which will help to understand licensing with BizTalk Serverhttp://www.microsoft.com/biztalk/en/us/pricing-licensing-faq.aspx
The main you should remember and use that:
Similar to SQL Server Enterprise, BizTalk Server 2009 ENT can be licensed for unlimited virtualized processors that are available on a single physical server. The customer will be required to license the number of physical processors on a server.

Passing XML as a parameter to Oracle or SQL

Image
In some cases we need to pass whole XML as a parameter to stored procedure in Oracle or SQL

The issue is you cannot write XML as XML element
XML will be broken

The solution is pretty simple

1. Create a BizTalk project
2. Create new orchestration
3. Create new message InputXML and set type to System.Xml.XmlDocument4. Create Receive shape assign InputXML to it as Message 5. Create Receive Port which will be assigned to file receive port in BizTalk applicatoin 6. Connect Receive Port with Receive shape 7. Create new Schema name it SQLParams
It should look like
XMLParam is the element which will hold our XML
8. Add new Message to orchestration name it Transformed, set type to SQLParams 9. Add variable Doc to orchestration , set type System.Xml.XmlDocument 10. Insert to orchestration Message Construct shape 11. Insert to Message Construct shape Message assignment shape name it Transformation 12. Edit Transformation , set expression

Doc.LoadXml(@"
<ns0:Root xmlns:ns0=""http://XMLParam.SQLP…

BizTalk Server 2009 course for IT

Working hard on BizTalk Server 2009 course for IT - Courseware Library.
Will be great if you will send your suggestions and regards to include
to the course. It will be available soon for Trainer Lead courses at Microsoft Certified Partners for Learning Solutions (MCPLS) centers.

BizTalk Server 2009 R2

BizTalk Server 2009 R2 is planned for 2010 and will include:

Support for new Platform releases:Visual Studio 2010
SQL Server 2008 R2
Windows Server 2008 R2
Improved Business to Business(B2B) scenarios:
Mapper Enhancements: Mapper Enhancement includes enhanced visualization, scrolling and search capabilities.
FPTS adapter: a secure and standards-based adapter allows exchanging documents between trading partners using the FTP protocol.
Updated B2B Accelerators
Productivity Enhancements:

Performance tuning dashboard
Improved support for event processing and filtering for RFID Events
Support PowerShell for Management tasks.
New SCOM object model to better reflect BizTalk artifacts.

Creating project ‘BizTalk project name’… project creation failed.

Creating project ‘BizTalk project name’… project creation failed.
This is a known issue which occurs while installing Service Pack for Visual Studiothe details and suggestions you can check at http://msdn.microsoft.com/en-us/library/ee449462(BTS.10).aspx
But sometimes just you can run BizTalk installer in Repair mode

Passing DateTime parameter to Oracle

While passing DateTime parameter to Oracle using generated schemeserror occurres. It is not possible to convert string to DateTime for oracle Stored Procedure
in this case binding property EnableSafeTyping must be enabled
for details please check http://msdn.microsoft.com/en-us/library/cc185389(BTS.10).aspx

Debatching records from WCF-SQL using LOOP and XPath

Image
I will continue on my sample which demonstrated records polling from SQL using WCF-SQL adapter
How I wrote in my last post it is not the best solution , it will be much slower then disassembling data in pipeline (which I will post in 2-3 days)
So what I want to do. First I will count the number of records retrieved from SQL then using LOOP shape I will iterate through records and send each to a file adapter
If you did not read my two last posts , read them and create BizTalk project , install SP and create table in MSSQL , create application and ports in BizTalk
I will continue on the same orchestration

Add new variable in orchestration and set Identifier: RecordsCount Type: System.Int32
After Send shape insert Expression shape Set expression :
RecordsCount = (System.Int32)(xpath("count(/*[local-name()='TypedPolling' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TypedPolling/ID1']/*[local-name()='TypedPollingResultSet0' and namespace-uri()='http://…
My previous sample will generate one file for outputso if my SP will return many records the result will be the same and in one output file I will get many records.
In some cases you will need to debatch/disassemble the result and for each record to have one separate file.
There are two ways to solve the issue 1. make disassembler changing the structure of the generated XSD 2. make loop in orchestration and retrieve records with indexer using XPath
In my next post I will show the 2nd option even it is not the best solution. Using disassembler will work many times faster if you have many records!

How to poll database using WCF-SQL adapter

Image
1. Create database and tables2. Create stored procedure 3. Create BizTalk project 4. Create orchestration 5. Consume WCF-SQL 6. Write received data to file share


First create TESTWCFSQL database from you SQL Management studio Run the script to create table:
USE TESTWCFSQL GO
IF OBJECT_ID('dbo.MainData', 'U') IS NOT NULL DROP TABLE dbo.MainData GO
CREATE TABLE dbo.MainData ( MainDataID int primary key identity(1,1), FirstName nvarchar(30), LastName nvarchar(30), Amount int ) GO

Run script in SQL management studio to create procedure
IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_SCHEMA = N'dbo' AND SPECIFIC_NAME = N'PollData' ) DROP PROCEDURE dbo.PollData GO
CREATE PROCEDURE dbo.PollData AS select MainDataID, FirstName, LastName, Amount from dbo.MainData delete from dbo.MainData GO

insert some sample lines executing
use TESTWCFSQL
insert into MainData (FirstName, LastName, Amount) values (N'Patrick', N'Cash', 1000), (N&#…