Tag Archives: soa

13 May

BizTalk, WIF, WF Tutorial – Part 2.3b Message content based routing – orchestration – configuration

In Part 2.3a we have created a simple orchestration reflecting the following business process.

BizTalk, WIF, WF Tutorial - Part 2.3b - Mail Filtering Business Process

We finished on clicking F6 and building the orchestration corresponding Mail Filtering business process. When any of the readers tried to click the small “play” button may have experience following errors.

BizTalk, WIF, WF Tutorial - Part 2.3b - Unsigned Assemply Errors

The solution to the problem is fairly simple. We just have to create a new key to sign both assemblies. We start from signing Orchestrations. Right-click on Orchestrations project and choose Properties.

BizTalk, WIF, WF Tutorial - Part 2.3b - Visual Studio project properties

Once in Properties window, we switch to Signing section. Where we choose Sign the assembly and create a new key.

BizTalk, WIF, WF Tutorial - Part 2.3b - Signing an assembly - Creating a key

In the pop-up window we choose to name our key MusialTkKey and we type the standard password: P@ssw0rd.

BizTalk, WIF, WF Tutorial - Part 2.3b - Signing an assembly - Password & Key name

We finish by clicking OK. We need to save the changes we have just made to project’s properties, so let’s click Ctrl+S. Now once the Orchestrations project is built, it will be signed using the configured key.

We should do exactly the same with Schemas project. The small difference if of course, that we will use Browse to find the already existing MusialTkKey.

When everything is done, we build both projects once again (Right-click on the Solution and Rebuild Solution). That’s all folks! Let’s do dome configuration. We launch BizTalk Server Administration Console. We then expand Applications and check if our MusialTk application contains already any orchestrations. As expected there are no orchestrations yet.

BizTalk, WIF, WF Tutorial - Part 2.3b - Orchestrations

There are many available ways to install BizTalk Application in BizTalk, but the one I found very useful and which has already been proven by me several times is using Resources group.

BizTalk, WIF, WF Tutorial - Part 2.3b - BizTalk Server Administration Console - Resources

No surprise, there are no resources yet. Let’s add both our projects starting from Schemas and Orchestrations. Right-click in the empty Resources window and then Add -> BizTalk Assemblies…

BizTalk, WIF, WF Tutorial - Part 2.3b - Adding Resources

In the new window we choose Add

BizTalk, WIF, WF Tutorial - Part 2.3b - Add Resources Window

We are then asked to select Assemblies which we want to add to the BizTalk Application.

BizTalk, WIF, WF Tutorial - Part 2.3b - Selecting Resource Files

There are actually two dll’s we should add:

  • Schemas.dll : Schemas/bin/Release/Schemas.dll,
  • Orchestrations.dll : Orchestrations/bin/Release/Orchestrations.dll.

Add Resources window should now look like below.

BizTalk, WIF, WF Tutorial - Part 2.3b - Add Resources Window

Important: both dlls should have exactly the same Options tab settings, that is all checkboxes have to be selected. We confirm newly added resources by clicking OK. In the Resources perspective both our dlls are to be seen. Let’s switch to the Orchestrations view to check, whether any orchestration appeared or not.

BizTalk, WIF, WF Tutorial - Part 2.3b - Unenlisted Orchestration

Exactly as we have expected. There is already one orchestration named Orchestrations.MailFiltering but it’s current state is Unenlisted (unbound) which means that no ports have been assigned yet. Right-click on Orchestrations.MailFiltering and then Properties.

BizTalk, WIF, WF Tutorial - Part 2.3b - Orchestration's Properties

In the newly opened window, let’s switch to Bindngs.

BizTalk, WIF, WF Tutorial - Part 2.3b - Orchestration's Bindings

We first select our host BizTalkServerApplication.

And now a small trick: we choose already existing IN-FolderReceivePort and for both outputs OUT-Folder-SendPort. This way we achieve exactly the same scenario as in the former Part. All messages, despite name will be forwarded to OUT-Folder.

But in order for our trick to work as expected, we have to clear the Filters on OUT-Folder-SendPort.

BizTalk, WIF, WF Tutorial - Part 2.3b - Send Port - Clearing Filters

Now the orchestration is bound but not yet started and enlisted. If we now try to drop a file into IN-Folder we would become an error saying that there are no subscribers. Which is exactly what we expect. Clearing Filters removed this subscription.

We go back to Orchestrations, right-click on Orchestrations.MailFiltering and then Start.

BizTalk, WIF, WF Tutorial - Part 2.3b - Started Orchestration

Let’s try to drop the two following XML files into IN-Folder.

BizTalk, WIF, WF Tutorial - Part 2.3b - Test XML Files

Files disappeared but… No files in OUT-Folder.

We go back to BizTalk Server Administration Console, select BizTalk Group node and click F5. There are actually two Suspended Service Instances which means that something wrong happened and now IN-ReceivePort and MailFiltering orchestration are suspended.

BizTalk, WIF, WF Tutorial - Part 2.3b - BizTalk Server Administration Console - Suspended Instances

Let’s click on the link Group by Application.

BizTalk, WIF, WF Tutorial - Part 2.3b - Errors grouped by Application

When we double click the one with Service Class = Messaging, we can see the following error information.

BizTalk, WIF, WF Tutorial - Part 2.3b - Routing Error Details

Pretty straightforward. No subscribers, which means that no one waits for our message. Question is: where lays the problem.

Receive Pipeline

This term is the answer. Our IN-FolderReceiveLocation used to work with all the files which means we selected PassThruReceivePipeline. When we do so, messages are not interpreted and no properties are promoted which completely disables routing based on the message type as a type comes from the content.

We go to IN-FolderReceiveLocation, right-click and select Properties.

BizTalk, WIF, WF Tutorial - Part 2.3b - In-Folder-ReceiveLocation - PassThruReceive Pipeline

All we need to do is to select XMLReceive.

BizTalk, WIF, WF Tutorial - Part 2.3b - IN-Folder-ReveiceLocation - XMLReceive Pipeline

Confirm clicking OK and we now can test if everything works. But before we do so, let’s go back to the group view and right click on MusialTk results and then Terminate instances. Finally confirm that you’re determined to do so.

BizTalk, WIF, WF Tutorial - Part 2.3b - Terminating Suspended Instances

Now when we click F5 on BizTalk Group we should see no suspended instances.

BizTalk, WIF, WF Tutorial - Part 2.3b - BizTalk Group View with NO Terminated Instances

Let’s drop both Amy.xml and Tom.xml into IN-Folder. Disappeared! Ha!

Now let’s check OUT-Folder. HA! Two new files!

BizTalk, WIF, WF Tutorial - Part 2.3b - OUT-Folder with Results

It works! Amazing, huh?

But we should now choose to save Tom’s messages other than the ones addressed to the others. Let’s clear OUT-Folder before proceeding. Now we go back to the MusialTk application in BizTalk Server Administration Console. Let’s review Send Ports. For now we have exactly one. Let’s rename it to OUT-Folder-Tom-SendPort.

BizTalk, WIF, WF Tutorial - Part 2.3b - Configuring TOM's Port

There’s actually a small thing to do. Let’s mark Tom’s messages with a prefix. In order to do so, click Configure… and type Tom_%MessageID%.xml in File name field.

BizTalk, WIF, WF Tutorial - Part 2.3b - Tom's prefixed FILE adapter

Now OK & OK and we’re done. If we now try once again to drop both XMLs we would get the same result, but both files would be marked Tom_*. This is not what we expect, and above all, how our business process looks like. As there are two outputs from the orchestration we should create another Send Port to handle Other’s messages.

We create a new port by right-clicking on the empty surface and selecting New -> Static one-way Send Port. We have already done that in the past, so you could check in previous parts of my tutorial. This time we name the port OUT-Folder-Other-SendPort and configure FILE adapter to prefix it’s messages with Other_*.

BizTalk, WIF, WF Tutorial - Part 2.3b - OTHER's Send Port

Once created, we right-click and choose Start.

Now we are almost ready to test. The last thing to do is to right-click on Orchestrations.MailFiltering, choose Properties and then map OtherMessagesOneWayPort to the newly created OUT-Folder-Other-SendPort.

BizTalk, WIF, WF Tutorial - Part 2.3b - Mail Filtering Orchestration with two diferent Send Ports

We confirm the changes clicking OK.

BizTalk, WIF, WF Tutorial - Part 2.3b - Orchestration changes blocked - Error

Surprise. We cannot change an already enlisted orchestration. We simply click Cancel and in the Orchestrations right-click on Orchestrations.MailFiltering we chose Unenlist. Now we go back to Properties and without any problems save a new configuration with Other Send Port. After configuration is altered we right-click and choose to Start the orchestration.


Let’s drop both XMLs into IN-Folder. Disappeared. Let’s switch to OUT-Folder and YEAH! There are two files with different prefixes.

BizTalk, WIF, WF Tutorial - Part 2.3b - Final Results

BizTalk did exactly what we wanted him to.

We succeeded once again in our BizTalk experience. This time we modeled a business process from the very beginning till the very end. Careful reader notices that as we already have a working orchestration, creating new Receive and Send Ports using completely different adapters is easy and only a matter of configuration and not implementation.

There’s even more to come.

03 May

BizTalk, WIF, WF Tutorial – Part 2.2 File operations

Having or not having read about the BizTalk basics, having installed the fresh and new instance of BizTalk Server 2010 we can finally start playing with it. In all examples I’ve seen in books or online, the first one is always with FILE Receive Locations moving a file from the source to the destination directory. No surprise, we’ll do exactly the same. Step by step, with all the errors that may arise, analyzing logs and finally getting it all working. I would like to avoid showing only 100% working examples as those are in real life the minority. There is always something that needs fixing, that we’ve forgotten or haven’t known about.

In order to do anything with BizTalk Server we need to launch its administration console. It’s an easy to use and fully functional MSC Add-On which is available configured from the shortcut in Start Menu.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Launching console

We launch it simply by clicking. After a short while we can see the following window.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - BizTalk Server 2010 Administration Console

As I’ve already mentioned, the window looks like a MSC-Add-On for it’s actually one. Readers alerady familiar with basic administration work in Microsoft Windows Server should have no problems with managing BizTalk as well. In the next step we expand BizTalk Server Administration tree node. We can see that on our computer is already installed and configured on BizTalk Group representing installed BizTalk Server 2010 instance.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Expanding tree

The tree expands into tree main subnodes:

  • Applications
  • Parties
  • Platform Settings

Names are pretty self explainable. The most important for us is of course Applications node. We expand it.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - BizTalk Applications

What we find there are three preinstalled applications. There’s the one called BizTalk.System which will be referenced by all our custom applications. The question is: Why? The answer is to find in the BizTalk.System -> Schemas node. There you can find all the common XML Schemas that can come in handy in your projects. That’s why we should always consider BizTalk.System application as the starting point, or better: a parent, for all applications that we plan to implement in future.

BizTalk EDI Application is the one we should completely skip and ignore at this point. It contains an example of using BizTalk Server 2010 in Electronic Document Exchange (EDI).

BizTalk Application 1 on the contrary to the before mentioned, does nothing actually. It’s a completely empty application meant to be a container for our first steps and experiments with BizTalk. We will simply ignore this one too, and create a brand new one.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Creating an Application

We right-click on the Application node and select New -> Application. In the window shown below we name our application after my blog’s address (just an example) and select make this the default application. After that we switch to References.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - New Application Window

Here we can see the uniqueness of BizTalk. System application. It’s already referenced. This connection can easily be removed, but now we should leave it unchanged and click OK.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Application references

After clicking OK our application MusialTk should be already seen among the ones we’ve talked about before.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Newly created Application

Before we can start configuring proper BizTalk Objects we should prepare the environment for our file system BizTalk application. We create a folder on disk in which we create two subfolders: in and out. IN folder is the one that we use to put files which should be read by BizTalk treated as messages and sent to the subscriber which will save it in OUT folder.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Directories set-up

Once folders are configured, we go back to BizTalk Server Administration Console. We start from creating Receive Port with corresponding Receive Location which will be responsible for picking up a file from IN folder and passing it to BizTalk MessageBox.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Creating One-way Receive Port

We chose to create One-way Receive Port. This kind of port is used every time when the sending part (publisher) does not require a response in return for its publishing action. As analogy to One-way Receive Port we can consider void methods in programming languages. We call them for their side effects and not for their result, as they return nothing.

In the window that was opened after choosing to create One-Way Receive Port we can choose its name and specify of course authentication that will be used in order to obtain messages through this receive port.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - new receive port

In our case no authentication is required so we simply leave No authentication. An interesting option, which isn’t also used in this part of my tutorial, is Enable routing for failed messages. If we select this option, BizTalk Server 2010 accepts all the incoming messages even if there are not subscribers. This allows us to implement actions that could respond to messages that have no subscribers. An example of such an action is to create Send Port which subscribes for messages that have been marked as failed. In this case we can store them for future use, send notification e-mail to the administrator and much more. For now let’s leave it unchecked.

In the next step we switch to Receive Locations in order to create physical adapters which will supply our receive port with messages. What’s the most interesting: We can have multiple Receive Location for one Receive Port. What does it actually mean? It means that when we expect to receive orders for our internet shop, we can await the messages on the WebService, WCF-Service, Disk Folder, HTTP Connection and more more. All of them will be routed through the one Receive Port.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Receive Port - Receive Locations

For now let’s create New.. (Receive Location). We give the Receive Location some logical name and we proceed to choosing its Type. In our case, from the very long list of available types, we choose FILE option.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - FILE Receive Location

All the other options we leave unchanged. The one that’s in my opinion, the most interesting is Receive Pipeline.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Receive Pipelines

By default there are two available pipelines:

  • PassThruReceive – does not treat messages as XML files, so no structure validation is applied. The message, file or any other data is simply passed through. No routing based on the message content is in this case available, as no XML data are parsed.
  • XMLReceive – treats incoming messages as XML files. In this case structure validation is applied and when the message is not a properly built XML file an error is returned. IMPORTANT: NO XML SCHEMA VALIDATION IS APPLIED BY DEFAULT. It can be configured and we’ll do so in future.

In our case, as we work only with files, we choose PassThruReceive. Before we can click OK we have to configure our Receive Location. It should know from where the messages are to be picked up. We click Configure.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Configuring FILE Receive Location

What we easily notice are two main fields to be configured Receive folder and File mask. We provide our IN folder path: C:\MusialTk\Part.2.2\in and change File mask to *.* (we decided not to limit ourselves only to XMLs). Other tabs we leave unchanged and click OK.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Configured FILE Receive Location

In the next window we simply confirm configuration we’ve just made clicking OK.

And now our Receive Port has a proper Receive Location.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Receive Port with configured FILE Receive Location

We confirm clicking OK.

Newly created receive port is now available in the list. But it’s not everything we should do to make it working. As we know that Receive Port is only an abstract structure built on Receive Locations we should check if it’s everything OK with our Receive Location.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Receive Ports list

Indeed, IN-Folder-ReceiveLocation is by default disabled.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Receive Location disabled by default

Let’s enable it. Right-click, and Enable. When everything is properly configured, in our case, when then folder exists and is available, we should see the Receive Location changing its state to enabled.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Enabled FILE Receive Location

Although you may feel that there’s something missing in our set-up, let’s try to drop a file in the IN-Folder. Let’s create on our desktop a file named e.g. testFile.txt.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Test txt file

Now we can copy our file and Paste into IN-Folder. After pasting we expect the file to disappear as BizTalk Server should take it into its MessageBox. But actually the file stays.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - IN-Folder should be empty but it is not

Now it’s the right time to get used to analyzing BizTalk logs. We get back to our favorite BizTalk Server Administration Console, but this time we expand Event Viewer (Local) node.  Next Windows Logs and Application. Among all entries we look for those with Source equal to BizTalk Server.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - BizTalk Permission Denied logs

The error message is pretty much self explainable. But what we’ve done wrong. Lets right-click on our IN-Folder and choose Security tab.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - IN-Folder Security

Among all the entries there is no BizTalk User. However there is a group named Users which has a few permissions. When we look closer these are only Read & Execute permissions. They should be enough when BizTalk would only want to read the file. But once read the file is deleted by BizTalk so that it won’t be read many times. There’s no other solution than giving BizTalk user the proper permission. But let’s make it on the parent folder, I mean Part 2.2.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Part 2.2 Folder Security

We click on Edit…

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Part 2.2 Folder Security - Edit

Then Add

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Part 2.2 Folder Security - Adding a new user

And finally we type in BizTalk. We can click Check Names too in order to check whether we provided the proper user name, but it’s not obligatory. We simply click OK.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Part 2.2 Folder Security after adding BizTalk user

In the next step we choose to select Modify (Write gets selected automatically). We leave Full control unselected. Then OK & OK.

IMPORTANT: When anything goes wrong (like in our case) then Receive Location that caused errors is disabled.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Disabled Receive Location

We right-click and select Enable. But a strange thing happens: It’s disabled again. That means nothing more than that we have another error. We check, yep the same.

The solution is fairly simple: give BizTalk user Full Control permission. We go back to Receive Locations and once again Enable. This time it stays enabled. Horray!

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - IN-Folder read and emptied by BizTalk

Our file disappeared as expected. But where is it now? See Application logs.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Message Routing error

Happened exactly what we’ve expected. There were no subscribes so the message could not be routed. But when we have our publisher working, creating a subscriber is a piece of cake.

We’ve already created Receive Port with its Receive Location. The play publisher role in our Publish-Subscribe BizTalk Play. So we need to announce a casting for subscribers. There are many available candidates, some better some worse but we decided to cast Send Port for subscriber role. It’s a fairly simple play in which the subscribers stands patiently under the publisher’s window and awaits messages. The only thing he needs to do is to filter messages and catch only those to which he subscribed. In our case the subscription is based on the Receive Port name. We say: if you said it to me through IN-File-ReceivePort then it’s addressed to me.

We go back to BizTalk Server Administration Console, expand MusialTk application, and right-click on Send Ports node selecting New -> Static One-way Send Port

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Creating Static One-way Send Port

As you can see there are two kinds of Send Ports:

  • Static – physically connected to the place, implementation and so on. For example in our case: physically connected to the OUT-Folder.
  • Dynamic – can be parameterized for example from the orchestration. This allows dynamic changes of the destinating parties/locations.

In our case we choose a simple Static One-way Send Port.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - New Static One-way Send Port

We name it OUT-Folder-SendPort, once again choose Type FILE and other options leave unchanged. We click Configure.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Configured FILE Send Port

We type in our destination folder location and leave other settings unchanged. Important we leave File name unchanged too. In BizTalk all the messages are treated as XMLs even though we are aware that the actual content of our incoming file (from IN-Folder) is not a well formed XML. We click OK & OK.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Unenlisted FILE Send Port

Newly created Send Port is now available in its Unenlisted state.

There are two available states of Send Ports:

  • Enlisted / Unenlisted – a port is already registered as a subscriber, so no Routing failed errors are thrown. But messages are kept in MessageBox until Send Port becomes enabled.
  • Enabled / Disabled – a port is enlisted and is working, which means ready to receive and process messages.

We right-clik on OUT-Folder-SendPort and choose Start.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Enlisted FILE Send Port

Now let’s test our Application once again and paste our testFile.txt in IN-Folder. Once again it disappeared but once again we get Message Routing error. There are still no subscribers. We configured no subscription on the newly created Send Port. Let’s fix it.

Right-click on OUT-Folder-SendPort and Properties. We switch to Filters. There are no available filters as no were created. In this tab we specify so called filter which are then read by BizTalk Server to determine if there are any subscriptions for the message that has just arrived in MessageBox.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - FILE Send Port - Empty filters

As we’ve already said before, we base our subscription in this simple example on Receive port name. So we choose Property and select BTS.ReceivePortName and in the field Value type the name of our Receive Port, that is IN-Folder-ReceivePort.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - OUT-Folder-SendPort with configured filter

We confirm clicking OK. Now we’ve successfully set up fully functional subscribers for messages which are sent through IN-Folder-ReceivePort.

Test time!

Lets paste once again our testFile.txt into IN-Folder. Disappeared? Great! Now let’s check out OUT-Folder.

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Output folder - working

Amazing, huh? It works! Our file has the name corresponding automatically generated MessageID (.NET GUID).

BizTalk, WIF, WF Tutorial – Part 2.2 File operations - Comparing IN and OUT file contents

And in spite of the fact that our out-file has an xml extension, its content is equal to the content of the in-file.

We did it. We’ve just set up and tested our first simple BizTalk application. If you’re ready for more, there’ll be more examples & more fun soon.

02 May

BizTalk, WIF, WF Tutorial – Part 2.1 BizTalk Basics

Before we begin playing with our fresh & ready BizTalk instance we need to develop a deeper understanding for the basis on which BizTalk is build. There isn’t much to explain for those of you who have already tried for example MQ. Although there are obvious analogies between the two, BizTalk Server 2010 is far more sophisticated and loosely coupled.

The whole concept of message passing is based on the abstract object called Message Box. It’s represented by the database in which all the incoming and outgoing messages are stored. Especially those received, before there are delivered to their subscribers. And now we’ve got to the point: publish-subscribe pattern. This fairly simple concept (pattern) allows to integrate even the most complicated business processes thanks to the already mentioned loosely coupled components.

Publish-subscribe pattern describes the situation in which there is an unspecified number of subscribers and also an unspecified number of publishers. Each publisher’s task is to send message to BizTalk MessageBox. None of the publishers is aware how many, if any, there are subscribers which are awaiting for the newly posted message. This completely removes any connection between the sender and the receiver allowing for example message delivery to unspecified, unlimited number of subscribers. Already mentioned subscribes, as well as publishers, are totally unaware of the fact how many, if any, publishers, publishing messages addressed to them, actually are available. Each role (subscriber/publisher) is responsible for its task (message) and nothing more than that. Publishing and subscribing can be done though simple disk folders, WebServices, WCF-Services and serious of available BizTalk Adapters.

I’m not going to explain in more detail neither the physical MessageBox implementation and structure nor list available publishing and subscribing adapters. All the information are available and googlable, so we can focus on having fun. We start from simple File Adapters, Ports and Location. In Part 2.2 we’ll set up a simple file publisher and also a file subscriber and connect them using simple configuration through BizTalk Administrator Console. Stay tuned!

25 Apr

BizTalk, WIF, WF Tutorial – Part 1.4 Installing BizTalk Server 2010

After installing all of the prerequisites for BizTalk Server 2010, having downloaded BizTalk Server 2010 Evaluation version, we can finally start our BizTalk experience. In order to install the mentioned tool we unpack installation files double clicking the downloaded file.

BizTalk, WIF, WF Tutorial - Part 1.4 - BizTalk archive

We start our journey from unpacking installation files where it’s the most convenient for us.

BizTalk, WIF, WF Tutorial - Part 1.4 - Unpacking

Once unzipped, we need to find the proper setup file in the destination folder (c:\tmp\BizTalk\BT Server).

BizTalk, WIF, WF Tutorial - Part 1.4 - BizTalk Setup file

On the start screen we choose to skip reading installation guide and go straight to the Install BizTalk Server 2010.

BizTalk, WIF, WF Tutorial - Part 1.4 - Installation start page

On the next screen we agree for the already provided serial number and confirm other values clicking Next.

BizTalk, WIF, WF Tutorial - Part 1.4 - Product key

Having no other choice, we resort to accepting the terms of license agreement.

BizTalk, WIF, WF Tutorial - Part 1.4 - License agreement

We don’t actually have to participate in the Customer Experience Program, but why not?

BizTalk, WIF, WF Tutorial - Part 1.4 - Customer experience program

The next step is the one we’ve been waiting for, patiently clicking Nexts. But we don’t need to add any of the features which are not already selected. In Additional software group is for example SahrePoint Adapter, but it’s only available for install when we already have SharePoint Server on our computer. The most important thing: we can easily add features even after the installation. That’s why don’t bother to select anything else but default and decide to click Next.

BizTalk, WIF, WF Tutorial - Part 1.4 - Installed compontents

In the next window we simply decide to do nothing and let the installer do the work for us. We choose, actually leave unchanged, Automatically install the redistributable prerequisites from the web and click Next.

BizTalk, WIF, WF Tutorial - Part 1.4 - Downloading components

We accept the list of prerequisites that will be downloaded for us and click Install.

BizTalk, WIF, WF Tutorial - Part 1.4 - Summary

If we’re lucky enough, everything goes fine and we see the following screen.

BizTalk, WIF, WF Tutorial - Part 1.4 - Windows Firewall settings

We decide to allow Windows Update to check for updates for BizTalk Server and click Next.

BizTalk, WIF, WF Tutorial - Part 1.4 - Installation complete

Can you believe it? We did it. We have successfully installed BizTalk Server 2010. We leave Launch BizTalk Server Configuration selected and click Finish.

What’s yet left for us is configuration. In the window shown below, there are values which have been set by default, but they do not meet our expectations.

BizTalk, WIF, WF Tutorial - Part 1.4 - BizTalk Configuration

We need to start, as we have already done before, from creating a new user account dedicated for BizTalk. How it’s done, you can read in Part 1.2 where a new user account for SQL Server 2008 R2 Instance was created.

We have to provide the Database server name corresponding to the SQL Server instance name, which we chose during SQL Server installation, that is: MSSQLSERVER. And apart from the database configuration, newly created user account data. Let’s name our user BizTalk. Funny thing about our SQL Server instance is that after clicking Configure we become Connection error. It turns out that the default setting, corresponding computer name (solemnly regret not having changed that!) was correct. So we bring back WIN-3D4NQKQQUI2 and click Configure once again.

BizTalk, WIF, WF Tutorial - Part 1.4 - Configured

This time success. Now we can review what components the installer is planning to install. For each component, or for the most of them, there’s going to be created a separate database. We simply click Next to proceed.

BizTalk, WIF, WF Tutorial - Part 1.4 - Configuration Wizard - summary

Installation starts and shows which components are already installed and which are pending.

BizTalk, WIF, WF Tutorial - Part 1.4 - Configuration progress

It requires a little patience, but the result is a great reward. We have successfully configured BizTalk instance, which is shown below.

BizTalk, WIF, WF Tutorial - Part 1.4 - Configuration wizard summary

We click Finish and that’s all. We can now start BizTalk Server Administration Console, but to see that, wait and see the next part of this tutorial. If any Windows Update info message appears, accept it and install all the required updates (I am going to do the same throughout the whole tutorial).

24 Apr

BizTalk, WIF, WF Tutorial – Part 1.2 Setting up the environment – IDE

Although there’s much more than only one, there’s the one that fulfills all the needs and does not require any plumbing due to missing functions… Visual Studio Ultimate 2010. I admit, MSDN I was using when I was a student, was an amazing thing, allowing all the top-class MS software. Mainly because of that I am used to the best and hopefully Microsoft allowed us to fell that luxury for some evaluation time too. As the next step in our environment setup we download the evaluation version of Visual Studio 2010 Ultimate. Installation process is simple enough to simply skip all the screenshots & Next/Nexts. The only thing worth mentioning: install all the available features. There’s no need to come back and fix any mysterious and hard to find errors later.

Once we finished installing IDE, we can move forward and install the database server. See Part 1.3 for more details.

24 Apr

BizTalk, WIF, WF Tutorial – Part 1.1 Setting up the environment – operating system.

There’s a variety of systems to chose from when we analysis BizTalk Server 2010 Server requirements. There’s even Windows 7 to choose from. The problem is, when we want to have the environment the closest to the production one, we should use any of the available Windows Servers. I decided to choose the one I am already familiar with, that is Windows Server 2008 R2. It’s available free of charge on Microsoft Websites as 180 days evaluation version. Enough to suit our needs.

I am definitely not going to describe how to install an operating system. That should the intelligent reader do on their own. I strongly recommend giving VDISKs a try. That’s a relatively new feature allowing to create Virtual Hard Drives, completely reusable, for example in Hyper-V. In my case, I had to resort to installing completely independent operating system not using any of the virtualisation tools, because my Intel Core Duo 2 is not yet prone to 64bit virtualisation capabilities. But still, VDSIK came in handy , not forcing any physical disk partitioning.

Once we have our fresh servers installed, we proceed to install:

  • Web Server Role (complete)
  • Features that can make our life easier, e.g. Windows Desktop Experience, Wireless Lan  Service.

For now that’s all we need to have. We continue our journey in Part 1.2.

24 Apr

BizTalk 2010 & Windows Identity Foundation (AD FS 2.0 & StarterSTS) & Worflow Foundation & more and more

On my old blog, before I have lost all the date from the former server, I promised myself an all the readers, who devoted their time to follow my notes, that the time would come, when I write everything I know about putting Federated Security between BizTalk, Workflow Foundation using the AD FS 2.0, StarterSTS to work in SOA architecture. Me and my friend Kacper Oko have already succeeded to do so in our master thesis. Now it’s the time to give back what we’ve taken from the thousands blog post, forum posts which helped us in achieving our goal. I’ll try to describe step by step and from the scratch how to start playing with BizTalk and all other mentioned technolgoies. Already in? See Part 1.

22 Oct

BizTalk and WIF: Receive location and port

As I promised a log time ago, I’ll try to describe in a few notes how I managed to federate BizTalk Server 2010 with StarterSTS and of course ADFS 2.0. One of the most important parts was forcing BizTalk to respect custom configuration files with proper bindings. It took me quite a while. But let’s make it step by step.

In order to start the orchestration that was responsible for the business process that I’ve automated, I needed a trigger. An orchestration is in BizTalk always triggered by the incoming message of the particular type. Exactly the same was in the one of my own. Therefore the situation was more interesting. Due to the SOA Paradigm I was using, I wanted to publish the orchestration as a WebService. This is of course possible in BizTalk. Moreover there are two options. ASP.NET WebService and WCF WebService. Knowing that my service needs to support the newest ws2007FederationHttpBinding that comes with Windows Identity Foundation, I used always the creator for WCF service.

Waht the most important is that in BizTalk 2010 the services can use two availible adapters:

  • the default one
  • Isolated adapter.

At the beginning I thought that it makes no difference which one I chose. But when I tried to modify the web.config published in the IIS by the creator, no changes were respected. As it turned out to be, the default adapter was hosted by BizTalk itself. Therefore the configuration corresponding to the web.config was stored somewhere else. And in the place not particularly available. The problem was that I needed to change the default settings and use the proper binding required by WIF.

As it turned out to be  changing the receive location to Isolated adapter (this means: the service is 100% IIS service and there installed & configured) resolved the problem. With these settings the web.config file could be aligned to the requirements. The configuration was now respected and federating BizTalk using ADFS  2.0 worked like a charm.