Friday, February 29, 2008

Grok talk on Business Rule Engine Essentials

I have presented a grok on BRE essentials tonight at our monthly Solutions Group meeting.  The main focus on my presentation was to give a quick glance at what is available to developers when they enter the realm of BizTalk.  Some smart guy once said that knowing what's available out there is half the battle.

Anyways, the main points of my talk was to show how you can interface with the BRE (from BRE to .NET, and from .NET to BRE).  I have found the BizTalk rules engine to be very efficient and fast.  In the last project we have, we had over 450+ policies, and each policy had an average of about 5-7 rules on each of them.  On top of that I had an orchestration that call the vocabularies, determine the policy that needed to be executed, and then execute that policy.  The time for all of this to happen, is between 1-2 seconds from the time the message enter BizTalk to the time it gets send back to the calling routine.

How do you show this much functionality in 20 minutes or less?  Well, I came out with this fictitious company that had the following requirements:

image

The first thing that you do in BizTalk is that you need to define the schemas that will contain the inputs and output of the message that you are dealing with.  So a simple schema:

image

Next, I have implemented those rules in the BRE composer

image

So now that I have the rules implemented, we need to get a way to call them and executed them.  Here is the sample solution code that will call this policy.

I have also included some code that shows how to call the vocabulary.  And some code to show how to implement a .NET assembly that can be called from the BRE.

image 

 

Feedback [good|bad] is always welcome.  Hope this help someone get a small peek into the vast universe of BizTalk.

Friday, February 22, 2008

How does a BizTalk guy pack?

From Brian Prince's questionnaire, here is my response.

A BizTalk guy knows that the whole world could be fit into a set of enterprise patterns (scatter/gather, aggregator, resequencer, etc).   So, we don't pack, we orchestrate the moving of all of the other so called *entities*.

Moving is what BizTalk does best.  A BizTalk guy will correlate the moving to a scatter/gather pattern application.  Each crate will be considered a message, and the content of each crate will be the message content. Since BizTalk is all about messages (your stuff),  each crate will be labeled (just like a promoted property) and it will be marked with a GUID (Angie...;). 

Once the contents are inside the Crate, the labels will be used for routing and destination.  As each crate is handled by different external entities, the content will still be private, yet still managed to be transported to the correct destination.

A BizTalk guy does not care what's inside each crate (Message content), all it cares is that it is delivery correctly to the final destination.  The order of the crates departing the old office will not be the same order as they arrived to the new office.  But it is OK, since a BizTalk guy knows how to handle asynchronous messages and knows about scheduling, service window, failed delivery and re-routing.

A BizTalk guy will set a pipeline component that will take all of the inputs and translate them to a canonical message (Crate). A BizTalk guy will take all of these crates from different sources (admin, sales, recruiting, pmo, app dev, management, etc) and orchestrate a smooth move by processing them by their labeled information and not their content.

Being BizTalk of course, this crate will have a guarantee delivery that the contents are the exact same that when it was submitted.  The BizTalk guy will create an orchestration that implements the scatter/gather pattern.  All boxes are then send out in no particular order, to different locations, but they will be find their target destination correctly.

Since this is going to be an asynchronous transportation, the BizTalk guy will make sure that a single receive port location will handle the gather pattern and a confirmation receipt will then be issue. A confirmation receipt can then be handled and after the identity is confirmed a FAB key can be issued.

Of course, a BizTalk guy will create an orchestration:

image 

and then attach another orchestration to it

image

so while other entities talk about

  1. Some Borat character(Uzbekistan) and/or browsers add-ins ,
  2. how cool is to stay late coding for free ,
  3. about boxes and their colors ,
  4. color boxes labeled v.2.0 that are not yet delivered,
  5. how to pack a box in 5 minutes, versioned it, and then unpack it and repack it on changesets,
  6. how to move your stuff by writing random xml code,

only a BizTalk guy does know how to move and in the process deliver quality  :P

Not only a BizTalk guy will deliver all crates and their contents to its destination, but it can also get real time monitoring (BAM) on the moving process and then once the move is done, we can provide with KPI's on the whole process as whole, bringing meaningful reports for ROI.

yeah, that's right... ;)

Thursday, February 14, 2008

How to restore TMM settings

If you have deleted the TMM settings from your task scheduler as I have mentioned on my previous post, and need to get them back, here is the xml. Create an xml file and copy the following xml to it and import this file into your Task Schedule under the MobilePC hive:

image

---- Cut here 8<----

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Source>MobilePC Display Handling</Source>
<Author>Microsoft Corporation</Author>
<Description>Microsoft Transient Multi-Monitor Manager</Description>
<URI>Microsoft\Windows\MobilePC\TMM</URI>
<SecurityDescriptor>D:(A;;FA;;;BA)(A;;FA;;;SY)(A;;FR;;;AU)</SecurityDescriptor>
</RegistrationInfo>
<Triggers>
<LogonTrigger>
<Enabled>true</Enabled>
<Delay>PT00M02S</Delay>
</LogonTrigger>
</Triggers>
<Principals>
<Principal id="Users">
<GroupId>Authenticated Users</GroupId>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
<Settings>
<IdleSettings>
<Duration>PT10M</Duration>
<WaitTimeout>PT1H</WaitTimeout>
<StopOnIdleEnd>false</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<MultipleInstancesPolicy>Parallel</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>true</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>true</WakeToRun>
<ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Users">
<ComHandler>
<ClassId>{35EF4182-F900-4632-B072-8639E4478A61}</ClassId>
</ComHandler>
</Actions>
</Task>

------ cut here 8<-----

Wednesday, February 13, 2008

WSS 3.0 studio extensions not working on x64 Vista

One more of those little annoyances. I can't play with this new set of tools on my laptop: Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions, Version 1.1, because it does not support 64bit.

image

bummer. Time to fire off my Windows 2003 Virtual machine.. :(

Tuesday, February 12, 2008

Amazon Web Services and Ruby

I have been using Amazon Web Services for quite some time.  I have a large collection of DVD's, and a fairly amount of eBooks.  I have written applications against the aws to get detail information for specific books and stuff.  My user interface skills are much to be desired  ;), but the important thing in here, is that Amazon, make it very easy to connect and query their services.

image 

Today, I attended the Ruby user's group meeting.  The presenter was Mike Culver from Amazon.com, his title is Web Services Evangelist. How cool of a title is that.?  During his presentation, he mentioned how Amazon is empowering developers to come out with creative ideas on how to use these services.

He showcased 2 websites that are kind of unique in the way of their approach using the AWS.  One of them created a full front end to amazon.com, so that they can get referrals:  www.tvmojo.com

The other site that is more impressive is www.zoomii.ca this one is really neat.  The user interface is very visual, and for what I saw seems to be very resource intensive.  Unfortunately, the site is still in Beta, and it is not open for the public, but trust me, it is very interesting.

In all, I did learned quite a few things out of this meeting about Ruby. One of these days I will write my first hello world on Ruby, or maybe I might take the challenge like Steve Harman suggested and write my own blog engine using Ruby... :P

Thursday, February 07, 2008

Data Dude for Studio 2008?

Does DataDude works for Visual Studio 2008?  The answer can be found on this blog post by Gertd:

visual-studio-team-system-2008-database-edition.aspx

Awesome, so it is time to create a new DB project.

SQL Server 2005 project

I get this dialog box:

Connection to Local Express Instance

going back. I have followed the instructions and set my options to use my SQL server instance:

Tools - Options - Database Tools

and my data connections is set to my local instance as well

Tools - Options - Database Tools

since I don't have SQLExpress running, I decided to follow the instructions on it. I click CANCEL on the previous dialog box, and I get this error:

Remote Server Connection

---------------------------
Microsoft Visual Studio
---------------------------
An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

I remember this error from before.  I has something to do with having the SQL Server Browser running for it to find it.

image

I go and turn this service on. I usually have ALL services stopped and I only run the services on demand when I need to use them. Yes, I do have lots of batch files that the only thing they do is to start/stop services... :D

humm. I still getting the error about not being able to connect.

I wonder if this has anything to do with the fact that I am running the 64-bit version of SQL server? Just for kicks, I delete the name of my instance on the tools-Options

Tools - Options - Database tools

BINGO.  It works like a charm.  I went back and turn that SQL Server Browser service off.  It still works... :D [one more service that I don't need to run.!]

My environment is Vista  Enterprise 64-bit, SQL Server Developer Edition 64-bit, BizTalk 2006-R2, Visual Studio Team Suite 2008.  I don't know if this has anything to do with it, but by leaving the instance name blank, Studio 2008 was able to connect to my local SQL Server instance.

 

oh well.

Tuesday, February 05, 2008

70-504: Windows Workflow Foundation 3.5

Part of working in the Solutions Team for Quick Solutions, Inc., is that we get special offers for all kind of Microsoft stuff. The latest one was an invitation to participate in the Beta Test for the exam 70-504- MS .Net Framework 3.5 Windows Workflow Foundation.

In order to study for this beta test I have to install vs2008.

Microsoft Visual Studio Team System 2008 Setup

Since I am not doing any C++ programming, I decided not to install any of the C++ components. By unselecting it, I saved almost 2GB in space...!! However, when I open Studio 2008 for the first time, I've got this error:

Package Load Failure

Package Load Failure

Package 'Visual C++ Resource Editor Package' has failed to load properly ( GUID = {74AAD8B2-3294-49CB-BB5D-E9BAB132BFD5} ). Please contact package vendor for assistance. Application restart is recommended, due to possible environment corruption. Would you like to disable loading this package in the future? You may use 'devenv /resetskippkgs' to re-enable package loading.

Selecting Yes, got rid of this dialog box. Now I went and try to create a sequential workflow application, and this is what I got:

Error Loading workflow .NET 3.5

An error occurred while loading the workflow. Please correct the following error and try reloading the document to view the workflow.

The designer could not be shown for this file because none of the the classes within it can be designed.

Using my 2nd brain, aka Google, I came across a lot of other post relating to this error, but none of them applied to my configuration. My configuration is Vista x64, with BizTalk 2006 R2, and Visual Studio 2005 Team System installed. I have installed the SDK for .NET 3.0 some time ago.

I can create workflow projects in 2005. However, using the .NET 3.5 does not seems to work.

image

When I compare both projects VS2005 and VS2008, the only differences I've found is that the 2008 reference these assemblies: System.WorkflowServices .Net 3.5, and the System.ServiceModel. The new assembly points to this location:

c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.WorkflowServices.dll

Then I started to dig out more information on the Event Logs. Then I found the culprit:

The Windows update "Update for Windows (KB929300)" was successfully installed. (Command line: ""C:\Windows\system32\WUSA.exe" "e:\setup\..\wcu\dotnetframework\dotnetmsp\x64\NetFX3.0-KB929300-v6000-x64.msu" /quiet /norestart")

It seems that after the setup has finished installing, it needed to reboot my machine. However, the /quiet and the /norestart flags did not report anything back to me. So I did not know I had to reboot for the workflow application 3.5 to work.

Now I can get back to reading Pro WF Windows Workflow in .NET 3.0, and try to run some samples out of the SDK before my test.