Rules Engines and Bayes’ Theorem

I had an interesting time yesterday writing a rule set in order to demonstrate that Bayesian analytics can be combined with rule processing in an entirelynatural fashion. Armed with an understanding of how a rules engine works, I also believe that it is entirely possible for a Rules Engine to implement and apply Bayes theorem in an efficient manner. I wrote the rule set for a Java-based rule engine called Jess, so please note this is not a BizTalk-related post.

My reason for writing the rule set was to counter some statements publishedon the Complex Event Processing Blog site, including references to a 20-year old academic paper that appears to claim, incorrectly, that rules engines cannot efficiently handle the concept of uncertainty. Bayes theory is one way of handling dependencies amongst uncertain beliefs (i.e.,calculating the probability (and changes to probability) of the accuracy ofhypotheses basedon uncertain beliefs and evidence). Another approach to handling uncertainty is to employ ‘fuzzy logic’, which I found myself demonstrating to a client (using MS BRE) just last week. But that’s another story…

If you are interested in this rather obscure discussion, please read on at http://geekswithblogs.net/cyoung/archive/2007/08/27/114988.aspx

Microsoft’s SOA and Business Process Pack incentive

Microsoft has a long history of taking hard problems and making them simple.  Twenty years ago simple word processing was a domain for experts.  Five years ago spinning up a simple intranet site for team collaboration required heavy assistance from IT and ongoing support well beyond the demands of its usefulness.  In the last several years Microsoft has made great strides in the SOA and Business Process Management space that will be equally transformative.


 


Your Microsoft account executive will work with you to determine just how impactful a SOA and BPM solution could be. To get started with your project,  Microsoft is providing an extra incentive. If you purchase the SOA and Business Process Pack between September 1, 2007 and February 29, 2008 you will receive a 10% discount from the total price of the individual products. 


 


Here is some additional reference material which you may find helpful:



 


1.      How to get started with SOA (see the attached/downloadable brochure) ESB Guidance


2.      Patterns and Prescriptive Architecture Guidance for Healthcare:


a.       Healthcare: Health Connection Engine;


b.       Consumer Engagement Reference Architecture (CERA)


3.      Office Business application (OBA) Reference Application Packs (RAPs) for Vertical Industries:


a.      Financial Services: Loan Origination Systems (OR-LOS)


b.      Manufacturing: Price Management; Supply Chain Management


c.       Public Sector: E-Forms Processing


d.      Retail: Store Operations


4.      Training:  Provided by Quicklearn, see their class at:  http://www.quicklearn.com/class_designing_enterprise_soa_solutions.aspx


 


 

Great Time at Houston TechFest

This last Saturday I had the honor of presenting at the first Houston TechFest.

Michael and his crew deserve to be congratulated in pulling this off so well.

The found the balance between number of topics and number of tracks just right, and

they pulled in over 450 people for the event.

Sogeti was there in force, with our Houston office going above and beyond. We

had no less than 3 speakers (Ben Scheirman, Mike Azocar and myself), each giving two

talks, and then members of the TechFest staff, and finally a table in the sponsor

area with many friendly faces connecting with the developers there.

I gave my “Introduction to C# 3.0” talk to well over 100 developers in the large Houston

Room, and early that day spoke to 20 valiant souls who showed up to “Introduction

to BizTalk Server 2006”. Both groups were absolutely great and it was a pleasure

to meet everyone.

Thank you to everyone in Houston who made this event possible, and I look forward

to next year!

EDI/AS2 R2 re-install error – Rahul comes to the rescue

BizTalk 2006 R2 when installing the EDI/AS2 component (or when re-installing), sometimes
there are some SSIS packages/jobs left that need to be manually deleted

My good mate Rahul has entered the world of
blogging
!!! and has blogged about
this very issue and what he did to get around it.

Well done Rahul!!!!

Also I might add upon  a reinstall of BTS 2006/R2 sometimes there
are the BAM Alerts notification service instance left over as well
 –
that typically needs to be manually removed from within the Sql Workbench.

Enjoy

Sharepoint – Cascading Drop Down Lists

Sharepoint – Cascading Drop Down Lists

Dependent Drop Downs, Cascading Drop Downs, Filtered Drop Downs.  Whatever you want to call them, this is where you have a secondary drop down list filtered based on the choice from the primary drop down list.  For example:  select a country and you get another drop down list populated with the cities in that country.


This functionality doesn’t seem to be there in WSS 3.0 and/or MOSS 2007. Perhaps I am missing something?  (It wouldn’t be the first time)  But this seems to be fundamental functionality.   Here is some more detail on the scenario:


Country List: I just want a basic drop down list of countries:


City List: I want to filter the cities based on the selected country:


I want a cascading or filtered drop down like so (select Australia, and get a list of Austrlian cities):



Select Germany and get a list of German cities: 


 

Anyway, I couldn’t find a way to do this out of the box, so…I decided to create my own custom field controls to overcome the problem.


I found a couple of useful articles on writing custom field controls.  This article describes how to create a custom drop down list user control along with a custom property page:


http://www.kcdholdings.com/blog/?p=56


I used a lot of code from this example, which has a couple of interesting points.First of all it shows how to create a custom Choice field that can be populated from any list on any site on the web farm (not just the current site). It also has an example of a way to get around the problem of saving custom properties of field controls. For some reason this is not as easy as it should be. I think this will be fixed in SP1. This article describes this problem:


http://www.sharepointblogs.com/ aaronrh/archive/2007/05.aspx


Instead of using a delimited string, I used a class to temporarily store the property values. Here is what my property pages look like for the Parent and Child drop down lists:




Anyway, after learning how to overcome the challenges of field controls in general, it was time to move on to the bigger problem of finding a way to create cascading drop downs. I figured there was hope in the “cross list query” or “caml query”:


http://msdn2.microsoft.com/en- us/library/ms467521.aspx


For example, if I want to filter a list of cities based on a country field in that list:



string caml = @“<WHERE>
                    <EQ>
                       <FIELDREF Name=”{0}” /><VALUE Type=”Text”>{1}</VALUE>
                     </EQ></WHERE>;
SPQuery query = new SPQuery();
query.Query = string.Format(caml, “Country”, “Australia”);
SPListItemCollection results = list.GetItems(query);
this.ChildDropDownList.DataSource = results.GetDataTable();
this.ChildDropDownList.DataTextField = “City”;
this.ChildDropDownList.DataValueField = “City”;
this.ChildDropDownList.DataBind();


So I have a parent drop down list that has a SelectedIndexChanged event, that I use to call a method in the child control that binds to the results of the above query.



void ParentDropDownList_SelectedIndexChanged(object sender, EventArgs e)
{
     ChildDropDownListFieldControl child = (ChildDropDownListFieldControl)
               FindControlRecursive(this.Page, “ChildDropDownList”).Parent.Parent;
     child.SetDataSource(ParentDropDownList.SelectedValue);
}


I played around with a lot of different ways to locate the Child drop down list on the page. This is the only one I got to work. (There has to be a better way?)


Anyway, I would appreciate any feedback on any better ways to do this. Here is the source code; I also have a solution file that you can use to install the controls. Just edit the install.bat and point it to the WSS or MOSS site you want to install it on.