04 Jul

Polish diacritic marks not working

If you’re Polish or any other nation that depends greatly on AltGr in your computer keyboard and moreover you’re using Windows 8 on a computer with Synaptics touchpad then you have probably lost your AltGr recently. This issue is caused by the latest update installed automatically by Windows Update. The issue revelas itself in a fact that you cannot use your AltGr (RAlt, right Alt) anymore. It starts working like your left Alt just opening menus instead of producing special characters like: ł, ó, ś, ć, ź, ż. Moreover if you use Ctrl+Alt instead of AltGr (btw. AltGr is just an abbreviation of these two key strokes) you get your diacritic characters back.

Read More

18 May

Embedded ActiveMQ Broker (TCP) using Spring’s @Configuration

I haven’t found it on the Internet or at least it wasn’t easy, so I leave it here: How to create an embedded ActiveMQ Broker which is started with the application context, listens on a given TCP port and is configured in Java Config @Configuration class.

@Configuration
public class AppConfig {

    public static final String BROKER_URL = "tcp://localhost:6060";

    @Bean
    public BrokerService broker() throws Exception {
        BrokerService brokerService = new BrokerService();
        brokerService.addConnector(new URI(BROKER_URL));
        brokerService.setPersistent(false);
        return brokerService;
    }
}
24 Dec

EDIMAX Print Server (PS 1216U) & Windows 8: Installing HP LaserJet 1018

I’ve recently decided to update my Windows 7 to Windows 8. And as most of the hardware my old Dell has worked properly with the new system, things got rough when I wanted to install my HP printer using Print Server Utilities from EDIMAX. Although they installed properly, there wasn’t any way to force it to find my print server on then Network (ping worked flawlessly). I googled for a while and found some old fashioned installation guide for EDIMAX Print Server from the year 2006. It turned out to be a piece of cake.

We start from launching Settings from the right slide-in menu.

Windows 8 right slide-in menu

Then we click Control Panel

Windows 8 Settings

Then simply View devices and printers
Windows 8 Hardware And Sound
Then Add a printer
Windows 8 Devices
We can skip automatic discovery, as there won’t be any results anyway. We choose The printer that I want isn’t listed.
Windows 8 Installing a new device

In the next dialog we choose Add a local printer or network printer with manual settings.
Windows 8 Printer Type
We decide to create a new port of type Standard TCP/IP Port.
Pinter Port
We type in the hostname which corresponds the IP of our EDIMAX Print Server (192.168.1.222 in my case).
Port IP

Automatic discovery won’t find anything in this case too.
Discovering Printer

That’s why we resort to Custom settings.
Custom port configuration

We choose LPR Protocol and despite the fact that our Print Server has only a USB-Port, we type in Queue Name: lpt1.
Port Configuration - important lpt1

Once again we give him some time to think…
Discovering

And after that we choose the driver for our printer. If our printer is not listed we can simply use a disk provided by the manufacturer. In this case we simply click Have Disk… and follow the instructions.
Picking device

We give our printer a name. Name it whatever you like.
Pinter name

Let’s not share it at the very beginning. You can always to that later, don’t worry.
Printer Sharing

We choose to print a test page and we’re ready to go.
Printing a test page

Again… we can give him some time.
Printing Test Page - Dialog

Et viola! It works!

You may sometimes notice the warning below, but don’t worry. The printer works despite of what it says.
Possible warning to ignore

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.

Testing

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.

05 May

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

In the previous part we discovered very basic capabilities of BizTalk Server 2010. We decided to implement and actually implemented a simple message routing Business Process that awaited a file as its input and produced XML result in the output directory. As the process was very simple we didn’t even bother to model it in any Business Process Modeler. This time, in spite of the fact, that the process once again is very simple, we decide to model the process so that everyone knows what is going to happen and when.

BizTalk, WIF, WF Tutorial - Part 2.3a - Business Process Model (BPMN)

Here’s our today’s simple business process named Mail filtering. As in every large organization our company needs someone or something (automata) to filter incoming mail too. In our case we consider an e-mail to be a XML file dropped into already known IN-Folder. This time however, we are not going to use simple BizTalk Filters which we configured on the Send Port in order to create a subscription for incoming messages. This time we need a decision based on content and not on the technical information connected to the protocol, file system, BizTalk variables etc. This time we need a fully qualified, well formed input message that will be later routed. Implementing this process is also possible with the use of only ports but we will do this in the next part.

Orchestration

This already well adopted and defined term is in its simplest definition, a series of actions which are invoked to integrate one or more WebServices. Despite we’re not using any WebServices in our example; its definition is totally OK. In BizTalk orchestration are not aware of the implementation of its output and inputs. We model them as special objects on the orchestration diagram and only through configuration in BizTalk Server Administration Console we tell them with who and how (e.g. which protocol) they should communicate.

Creating a new BizTalk Project to transform BPMN into a BizTalk Orchestration

In order to start transforming our BPMN process model shown above into BizTalk Orchestration we need to create a new BizTalk project. We launch installed Visual Studio 2010 Ultimate calling Start Menu -> Visual Studio 2010 -> Visual Studio 2010.

BizTalk, WIF, WF Tutorial - Part 2.3a - Visual Studio 2010 Start Page

We choose New Project… on Start Page.

BizTalk, WIF, WF Tutorial - Part 2.3a - Creating a new BizTalk project

From the Installed Templates list we choose BizTalk Projects and the first one available that is Empty BizTalk Server Project. Let’s name our new project MusialTk-Part2.3. We confirm clicking OK.

BizTalk, WIF, WF Tutorial - Part 2.3a - Solution Exproler - Start

Solution explorer shows an empty project named after our Solution. Although the name is OK for the whole solution, it does not appear to be OK neither to store Orchestration nor Schemas. Let’s remove it. Right click and Remove.

BizTalk, WIF, WF Tutorial - Part 2.3a - Removing project

The next thing we have to do is to prepare our solution form the scratch.

We are going to divide our business process into the following parts:

  • Schemas – here we are going to store all XML Schemas that will be used by our process (orchestration)
  • Orchestrations – this project will reference Schemas and store an orchestration for Mail filtering business process.

There will be more projects, e.g. Maps, they are not yet needed. We are not going to use canonical schemas yet. I leave it for the next part.

Now we need to create & add to the solution two new projects: Schemas and Orchestrations.

BizTalk, WIF, WF Tutorial - Part 2.3a - Adding a new project

We select Empty BizTalk Server Project and type name Schemas.

BizTalk, WIF, WF Tutorial - Part 2.3a - Adding an empty BizTalk project

The same for Orchestrations. And Solution Explorer should look exactly as shown below.

BizTalk, WIF, WF Tutorial - Part 2.3a - Target Solution Explorer

In our simple case there is no real need to group schemas or orchestration in any folders. But when we start e.g. using WebServices and consuming its schemas and bindings we will rebuild our project structure. For now it is enough.

Create a message schema

Before we can start any business process transformation which in result will give a BizTalk orchestration we have to prepare XML Schema that describes the messages that we expect from our orchestration to support.

We right-click on Schemas project and choose Add -> New Item.

BizTalk, WIF, WF Tutorial - Part 2.3a - Adding a new schema item

In the opened window we choose Schema and name it SimpleMessage.xsd (we will get to complex messages in future).

BizTalk, WIF, WF Tutorial - Part 2.3a - Adding a new schema item window

After clicking Add an editor window is opened with default schema with default root element.

BizTalk, WIF, WF Tutorial - Part 2.3a - Default schema structure

What we should start from is changing the target namespace of our XML Schema. This in my opinion should never be left in its default state, because what does it actually mean http://Schemas.SimpleMessage? Let’s change it to fit our naming concept.

We select Schema node in the editor window, and go to the Properties window and type in Target Namespace: http://MusialTk.Tutorial.Part.2.3.SimpleMessage.

BizTalk, WIF, WF Tutorial - Part 2.3a - Changing target namespace

We have already named the new schema SimpleMessage but the root node does not reflect it yet. We should rename it to match the schema name. In order to do so, select the root node and click F2.

BizTalk, WIF, WF Tutorial - Part 2.3a - Renamed root node

Having renamed our root node we should create any of the actual fields that can handle any data input. For now, creating instance of SimpleMessage.xsd gives only the following file.

BizTalk, WIF, WF Tutorial - Part 2.3a - Instance XML file

You may wonder how this instance was created, but there is no magic behind the scenes. We simply right-click on SimpleMessage.xsd in Solution Explorer and choose Generate Instance.

BizTalk, WIF, WF Tutorial - Part 2.3a - Generating schema instance

In the Console appears a line saying where a new instance was generated.

BizTalk, WIF, WF Tutorial - Part 2.3a - Generated instance - console output

Adding fields to the schema

In order for an instance XML to carry any data we should create at least a few fields as child nodes of the SimpleMessage root node. There is nothing simpler than that. We right-click on SimpleMessage node in SimpleMessage.xsd and select Insert Schema Node -> Child Field Element.

BizTalk, WIF, WF Tutorial - Part 2.3a - Adding XSD child element

Let’s name the new field reason. But we still do not have a filed on which the routing should be based (see BPMN model of Mail filtering business process). We follow the same path and create the second field name. This should be enough for our simple process. Both elements we leave with their default data types, that is xs:string. SimpleMessage.xsd should look exactly as below.

BizTalk, WIF, WF Tutorial - Part 2.3a - Target SimpleMessage schema

 

For those not yet familiar with XSD Schema syntax, our fields were by default surrounded by <xs:sequence> and <xs:complextType>. The former means that elements in an instance file for this schema must appear in exactly the same order, that is: if the name element appears before the reason then a XML file is invalid for this schema. The latter complexType element says that our root node SimpleMessage is composed of subtypes like name and reason.

Let’s try to generate instance once again. This time the content should be more comprehensible and usable.

BizTalk, WIF, WF Tutorial - Part 2.3a - SimpleMessage XSD instance

Better, isn’t it? Let’s copy the instance file to the desktop so that we could easily play with it and drop it into IN-Folder in the future.

BizTalk, WIF, WF Tutorial - Part 2.3a - Instance file on the desktop

Creating orchestration

When we already have a message schema we can start modeling the actual business process. We go back to our favorite Solution Explorer, right click on Orchestrations project and select Add -> New Item. Then we choose BizTalk Orchestration and name it after BPMN Pool from the diagram: MailFiltering.odx.

BizTalk, WIF, WF Tutorial - Part 2.3a - Adding new Orchestration item

Quite lot naming and not only naming conventions concerning BPMN modeling are to find in BPMN Method & Style by Bruce Silver. This book is strongly recommended not only for business analysts & business process modelers, but also for more technical aware IT people. It really helps in understanding and in doing it right (BPMN modeling).

Newly created orchestration for MailFiltering should look like the one shown below.

BizTalk, WIF, WF Tutorial - Part 2.3a - Mail filtering empty orchstration

There are two main parts of this editor window:

  • Orchestration surface – here are all the orchestration shapes dropped. All of the shapes have a corresponding operation, for example if-statement.
  • Port surface – here are dropped all the ports that represent inputs & outputs of our orchestration. As I have already said, here there is no physical implementation considered. We say only which schema should messages have and whether ports as one-way or two-way.

The question is: where to start? We can make it step by step analyzing the BPMN model.

Mail filtering business process starts on the left hand side with an event invoked on a message arrival.

BizTalk, WIF, WF Tutorial - Part 2.3a - BPMN Message Event

This means nothing more than that we should start the orchestration from receiving the message. When we do so, every time a message appears on the connected Receive Port it is automatically forwarded into the orchestration. What’s more important, we can and we will specify than on the message arrival a new instance of the orchestration should be created. But step by step…

We start from dragging & dropping Send shape from Toolbox onto the orchestration surface.

BizTalk, WIF, WF Tutorial - Part 2.3a - Toolbox with Receive Shape

Like this..

BizTalk, WIF, WF Tutorial - Part 2.3a - MailFiltering orchestration only with Receive Shape

What does this exclamation mark mean? That there is no Receive Port connected with the Receive Shape. Let’s rename our shape to ReceiveSimpleMessage and drag & drop Port from Toolbox onto the Port Surface. When we do so Port Configuration Wizard is opened.

BizTalk, WIF, WF Tutorial - Part 2.3a - Port Creation Wizard - Start Page

We click Next.

BizTalk, WIF, WF Tutorial - Part 2.3a - Port creation wizard - Port Name

We name the port after the message it receives (SimpleMessage) and continue clicking Next.

BizTalk, WIF, WF Tutorial - Part 2.3a - Creating a new port type

Here we decide if we want to create a new Port Type or use an existing one. As none already exists we choose Create a new Port Type. Below we say it is a One-Way type (we use FILE Adapter which works without any problems with One-Way Receive Port – see Part 2.2).

There are three leaves of Access Restrictions:

  • Private – is not available from the outside world so no physical port can be connected,
  • Internal – available from BizTalk Server Administration Console but cannot be published as WebService or WCF-Service,
  • Public – freely available for everything.

We choose Internal and click Next.

BizTalk, WIF, WF Tutorial - Part 2.3a - Port direction

In the next step we specify the Port direction which in our case is I’ll always be receiving message on this port. We decide not to specify Port biding as we would like to keep the orchestration unaware of the physical implementation. It is enough to say that we will receive messages and we will do it one way. Orchestrations do not require any more information. We click Next.

BizTalk, WIF, WF Tutorial - Part 2.3a - Port creation wizard - Finished

Finished. Click Finish. Orchestration is automatically updated and in Port Surface appears the newly created port. But the exclamation mark stays.

BizTalk, WIF, WF Tutorial - Part 2.3a - Orchestration with the newly created receive port

Let’s switch to the Orchestration View. There are among all the folders also the port and the port type we created before. But next to the SimpleMessageOneWayPortType we notice another exclamation mark.

BizTalk, WIF, WF Tutorial - Part 2.3a - orchestration view - configuring port

Once extended, the node shows a more detailed structure of the Port Type.

BizTalk, WIF, WF Tutorial - Part 2.3a - Orchestration View - More details

Interesting? Yes. The wizzard created automatically an operation named Operation_1 that accepts an input named Request. That’s exactly how one-way ports are modelled. They allow us to post the content, but do not return any value.

What is this Operation_1 for? If we publish the Receive Port using Orchestration publishing wizzard this operation would be transformed into a SOAP method described in WSDL. This means than we try to consume our service in visual studio, generated snippet would contain a void method named Operation_1 accepting a parameter Request. The problem is that we do not know what type the Request is. And that is the reason why the error message is shown. Before we select the node Request and switch to the Properties view, let’s change names to reflect our process naming concept.

BizTalk, WIF, WF Tutorial - Part 2.3a - Orchestration View - Missing message type in Port Type

Now Properties.

BizTalk, WIF, WF Tutorial - Part 2.3a - Port Type's message properties

We see an exclamation mark next to the empty Message Type field. BizTalk expects us to provide a type for the message accepted by the method. Otherwise no content based message routing inside an orchestration would be available.

While browsing all the available data types we see, that SimpleMessage schema is nowhere to find. That is because we did not reference Schemas project in the Orchestrations. In order to do so we right-click on Orchestrations and select Add reference….

BizTalk, WIF, WF Tutorial - Part 2.3a - Adding reference to Schemas

We select Schemas and click OK. Now when we go back to properties of the Port Type we can choose Schemas -> Select from referenced assemblies.

BizTalk, WIF, WF Tutorial - Part 2.3a - Message Type from the referenced Schemas assembly

After selecting Schemas assemblies we can simply select SimpleMessage schema. We can simply click OK and move forward as our simple example should not be influenced by any changes in future. But let’s do it already the right way.

If we choose to have SimpleMessage as a type for the parameter and later on for the Receive Port and then Receive Shape, when we liked to change the parameter type in the future that would cause us a lot of pain. There is no way to change the type without disconnecting the shape from the port. There is actually no way to skip editing Port as well as Receive/Send shape. However, there is an easy way to save ourselves all that trouble. We will use Multi-part message type.

Why Multi-part messages are so special?

As we have already said binding schemas directly to Ports and Shapes can cause problems when we want to apply any changes in future. But how Multi-part messages solve this problem? As the name says, they are composed of many parts, headers and the most important body. There is always only one body pro message. What is the most interesting: we can dynamically change which part is actually the body. Which means that when any changes happen, we can simply introduce a new part, and switch isBody flag to true. How is it possible with Shapes and Ports? Simple. They are all now type aware but Multi-part type aware. This means that they do not care what the message contains as the type before and after the change matches. What difference does it make if the same Multi-Part Message has different body? No difference. We can easily swap & switch & change.

Creating a Multi-part message for SimpleMessage schema

We go back to the Properties view of the sendSimpleMessage‘s parameter. Instead of selecting Schema from referenced assemblies we expand Multi-part messages and then click Create new Multi-part Message Type.

BizTalk, WIF, WF Tutorial - Part 2.3a - Creating a Multi-part Message Type

Message type is automatically created in Orchestration View and Visual Studio switches Properties View to the newly created type.

BizTalk, WIF, WF Tutorial - Part 2.3a - Multi-part Message Type properties

We start from changing the name to SimpleMessageMultiPartType. Let’s switch to the Orchestration View.

BizTalk, WIF, WF Tutorial - Part 2.3a - Multi-part Message Type in Orchestration View

We see that there is already one MessagePart_1 created. In its Properties we can find Message Body Part set to TRUE. In Properties vie for MessagePart_1 we change the name to BodyPart and select SimpleMessage as Type (we expand the list, select Schemas and click Select from referenced Assemblies, look for Schemas assembly, select SimpleMessage and click OK).

BizTalk, WIF, WF Tutorial - Part 2.3a - Body Part Properties

Now only one exclamation mark has left.

BizTalk, WIF, WF Tutorial - Part 2.3a - MailFiltering Orchestration - one exclamation mark

There is an easy way to fix it: drag this trianglo-square from the Receive Port to the “socket” of the Receive Shape.

BizTalk, WIF, WF Tutorial - Part 2.3a - Receive Shape connected with the Port

Now we are almost prepared for receiving. We need to set Activate flag on Receive Shape on  TRUE. We have already spoken about that. It means that for every incoming message a new orchestration instance should be created.

BizTalk, WIF, WF Tutorial - Part 2.3a - Receive Shape properties

We can now click F6 and build the whole solution. Build succeeded. But in spite of the fact that we are receiving we are doing completely nothing with the message.

We go one step forward and transform BPMN conditional branch.

BizTalk, WIF, WF Tutorial - Part 2.3a - BPMN Branch

One quick look on Toolbox and there it is: Decide Shape.

BizTalk, WIF, WF Tutorial - Part 2.3a - Decide Shape in Toolbox

We drag it and drop it right after Receive Shape. After a quick rename operation it should look exactly as shown below.

BizTalk, WIF, WF Tutorial - Part 2.3a - Prchestration with Decide Shape

We have another exclamation mark to resolve. This time we select IsTom branch and go to Properties view.

BizTalk, WIF, WF Tutorial - Part 2.3a - Rule Shape properties

Conditional Expression is missing. So we set focus on the Expression field and click…

BizTalk, WIF, WF Tutorial - Part 2.3a - Empty expression window

For those of you already familiar with C#, writing conditional expression should not cause any trouble.

On the Receive Shape Properties we saw that the message that is created in the orchestration after receiving it from the BizTalk MessageBox is named Message_1. So let’s try to type it.

BizTalk, WIF, WF Tutorial - Part 2.3a - BodyPart in Expression Window

No surprise, BodyPart is available. We select it and type dot.

BizTalk, WIF, WF Tutorial - Part 2.3a - Missing name property

This time it is not so simple. There are no properties available in spite of the fact that we know that name and reason are there. We close the window clicking Cancel.

Promoted properties

The problem with not available XML elements can be resolved with use of Promoted Properties. These are those XML Schema elements that we choose to promote in order to provide, for example routing and conditions like the one above. (http://support.microsoft.com/kb/942250)

Promoting SimpleMessage name property

In order to fix the problem with missing properties and allow us to write the proper condition we go to Schemas project and open SimpleMessage.xsd. We right click on name node, select Promote and then Show promotions.

BizTalk, WIF, WF Tutorial - Part 2.3a - Quick promotion

All we need to do in order to apply IF condition in the Decide Shape is to click Add and create Distinguished property. The difference between the distinguished and promoted properties is as follows: the former is dynamically resolved every time is read and promoted property is statically filled when message arrives.

BizTalk, WIF, WF Tutorial - Part 2.3a - Dinsguished Properties

We click OK. And now we go back to the IsTom expression window.

Warning: sometimes the promoted property is available once all the projects in solution are cleaned & built.

BizTalk, WIF, WF Tutorial - Part 2.3a - Expression window with name property available

We confirm clicking OK. And after that the orchestration should look as shown below.

BizTalk, WIF, WF Tutorial - Part 2.3a - Orchestration with the proper condition

Now we have to react somehow on messages addressed to Tom and all the other. In both situations messages should be saved but in different directories.

BizTalk, WIF, WF Tutorial - Part 2.3a - BPMN - Sending to directories

We are going to use FILE adapters once again so at this point all we need to know is that One-way Send Ports are the most suitable. We start from dragging and dropping two receive shapes, one in each branch. After a simple rename to SendTomsMessage and SendOtherMessage the orchestration should look as follows.

BizTalk, WIF, WF Tutorial - Part 2.3a - Decide branch with Send Shapes

Once again we have to cope with exclamation marks next to Send Shapes. Once again they appeared due to lack of corresponding Send Ports on the Port Surface. We start by dragging and dropping TomsMessageOneWayPort. We click Next in the first step.

BizTalk, WIF, WF Tutorial - Part 2.3a - One Way Send Port - Name

In the next step we type the Name: TomsMessageOneWayPort and click Next.

BizTalk, WIF, WF Tutorial - Part 2.3a - New Send Port Type

Once again we choose to create an Internal, One-Way port. We confirm clicking Next.

BizTalk, WIF, WF Tutorial - Part 2.3a - Always sending

This time I’ll always be sending messages on this port. Then Next. And we are done. Confirm clicking Finish.

In the Port Surface should appear the following port.

BizTalk, WIF, WF Tutorial - Part 2.3a - Send Port - Default names

We apply some renaming.

BizTalk, WIF, WF Tutorial - Part 2.3a - Renamed Send Port

The question is: why can’t we simply add another operation for sending messages for other names? It’s impossible due to the static binding between orchestration ports and Send Ports in BizTalk Server Administration Console. FILE Adapter requires specific directory settings pro port so we need to specify two orchestration send ports. If we were using for example a WebService with the two methods for both cases, we could implement it using only one orchestration’s send port.

After renaming we need to specify the message type. In order to do so, we go to the Orchestration View, expand TomsMessagesPortType -> sendToTom and select message node. We switch to the Properties View and chose in the field Message type the following option: Multi-part Message Types -> Orchestrations.SimpleMessageMultiPartType. Why? We received the following message, we didn’t transform it, but we would like to store it unchanged. That is why we can use the already created multi-part message type.

BizTalk, WIF, WF Tutorial - Part 2.3a - Send Port Message Properties

Even though we have connected the Send Shape with the newly created Send Port exclamation mark stays.

BizTalk, WIF, WF Tutorial - Part 2.3a - Connected Send Port with exclamation mark

Properties for the SendTomsMessage Shape shows that BizTalk does not know the message it should send.

BizTalk, WIF, WF Tutorial - Part 2.3a - Send Tom's Message Shape properties

We simply select our already known Message_1. The only one available though. After choosing the message exclamation mark disappears. SnedTomsMessages done. We should do exactly the same with SendOtherMessages. I mean: create a new Send Port (OtherMessagesOneWayPort), create a new One-Way Port Type (OtherMessagesPortType), select existing multi-part message, connect the shape with the port and select the message to be sent.

BizTalk, WIF, WF Tutorial - Part 2.3a - Connected Send Port - no errros

We are done. We switch to Release and build the whole solution clicking F6.

BizTalk, WIF, WF Tutorial - Part 2.3a - Switch to release

As it is already a pretty long note, we will continue with configuration in BizTalk Server Administration Console in the next part (Part 2.3b)

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.3 Installing SQL Server 2008 R2

In order to install BizTalk Server 2010 at all, we need some kind of SQL Database. I haven’t personally tried any other than SQL Server 2008 R2 in its Full Enterprise edition (thanks to MSDN). Now we’re not going to make any exception to the rule: the more expensive the better and once again we’re going to use SQL Server Enterprise. Of course it’s free and available for download fully functional trial version. Totally enough for our tutorial and BizTalk party.

We download the file from Microsoft and proceed with the installation. Not actually interesting it’s worth to synchronize all the settings so that we can be sure, that everything works as expected.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Extracting files

We extract temporary installation files where convenient. We have to be patient as the whole process can be a little time-consuming. Kaffeepause!

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Extracting finished

Once it’s finally over, we look for the most convincing file, to start the installation. The one shown below should to the trick.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Setup file

Again that some time your time…

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Installation - Waiting

We’re installing our BizTalk environment from the scratch, so there isn’t any other instance of SQL Server 2008 R2. There can, and after installing Visual Studio 2010 Ultimate, definitely is already installed an instance of SQL Server Express 2008. But that should not be a problem now.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Installation - Start page

We simply chose Installation from the menu on the left and then New installation or add features to an existing installation.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Starting installation

Surprisingly… we are asked to wait again. If we’re lucky enough we see in a few seconds a window shown below.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - First passed test

The curious reader can of course take a look at details using Show details, but our philosophy for most of the installations that are yet to come is: achieve as much as possible, doing as least as possible. So.. we click OK.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Version

In the next step we’re asked to chose our license type. We simply chose Evaluation (already selected) and click OK.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Terms

We accept, what we’ve just read (yeah, right!). Those willing to share their usage info with Microsoft, select apart from I accept license terms also the option Send feature usage to Microsoft. And what? Next.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Setup support files

Nothing left to click but Install. And as we’re kindly asked to restart our computer, having actually no other choice, we click OK.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Restart pending

To my surprise, after clicking OK no restart happened. The installation process went forward showing another summary.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Setup suport rules

We can simply ignore Windows Firewall warning as we’re not planning to access our SQL Server from the outside world. Then we click Next.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Setup role

Options in the next dialog we leave unchanged, deciding to Install SQL Server Database Engine Services and all the goods that come in the bundle. We confirm again by clicking Next.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Installation options

When in the next dialog we chose anything other than Select All we are really likely to be back here again as our SQL Server will be missing any of these magical functions. What’s even more interesting: error messages when any of the features are missing aren’t necessarily always straightforward and that we should install that and that. In most cases we are left with an ErrorCode to google for. So we choose all and confirm clicking Next.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Installation rules - summary

Another test passed, so Next.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Instance configuration

Those planning to name the database instance after a cat or a dog should feel free to do so. But what I really recommend is to select Default instance and confirm clicking Next.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Disk space requirements

Having no other choice we confirm disk space requirements and proceed forward using Next.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Server configuration

In the next step we are asked to bind user accounts with each of the services that will be installed. The easiest and preferred way is to create a new account named for example SQLSERVER. Let’s do this.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Adding a new user

We choose one of the simplest passwords, that meet the default system requirements: P@ssw0rd. This is not advised to do so in a production environment, but for our test configuration that definitely enough. We chose to disable password change and allow the password to last forever. We go back to the installation and fill fields so that they match the configuration shown below.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Accounts configuration

In the next step we make further security decisions.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Authentication

This time we chose to use Mixed authentication mode providing our standard, super secure password P@ssw0rd. We also chose to Add current user to the group of SQL Server administrators. After that, simply Next.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Analysis services configuration

We chose to promote our current user to the Analysis Services administrator too.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Reporting services configuration

We’re not planning to user SharePoint, although me and my friend Kacper Oko have already succeeded to integrate BizTalk, SharePoint and Workflow Foundation together. We get there with our tutorial some day. I promise. For now the option selected by default is enough and we go forward clicking Next.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Error reporting

 

This time let’s make Microsoft aware of the bugs we’re going to encounter.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Ready to install

Let’s make it happen… Install. And we have a lot of time to make ourselves a cup of tea or coffee.

BizTalk, WIF, WF Tutorial - SQL Server 2008 R2 - Installed

We did it. OK & Close. Let’s make a restart and after that we will install BizTalk Server 2010. All that and even more in Part1.4. That’s all folks!

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.