Showing posts with label Windows Workflow Foundation. Show all posts
Showing posts with label Windows Workflow Foundation. Show all posts

Wednesday, July 18, 2007

Rule Vendors - Product Derby

Once a year, during the business rules symposium, vendors of rule engines can show how they implement a general use case that contains many business rules. This use case is known as the UServ Product Derby. You can read the specifications here.

A few years ago I was actively involved with the implementation using Aion (from CA). Last year I put together the web front-end for Corticon. And recently I've been examining the implementation from Microsoft with WF rules.

Microsoft's example (download here) illustrates the technical feasibility of using WF rules. Although this example shows that it's technical possible, it does not highlight the business rules management, rule audit trail and rule traceability.

For me it was a nice opportunity to see if the Rule Manager from Acumen Business could visualize the rules and perform rule verification on the policy to discover if the actual implementation was logically correct.

We start this blog series with a closer look at the 'Driver's Eligibility' policy as defined in the use case. After a few adjustments on the Rule Manager, I produced this report (PDF, XPS) from Microsoft's example implementation.

The part that got my attention right away was the discovered contradiction. On first look, the rule DA_7 is rather complicated. It is a typical programmer's construction to use a not (expr and expr)
Such a statement has probably a few nanoseconds advantage on your processor. However do we really want the business user to decipher this statement by applying De Morgan's law?

Just keep it simple stupid. Where possible, avoid negated nested expressions and split or-statements in multiple rules.

You might wonder if we found an error with the rules example? The example should work fine, however the example uses rule priorities to ensure that rule DA_7 (priority -1) , is executed after DA_8 (priority 0). The problem that I have with rule priorities is that you throw away the declarative features of a rule engine. Suddenly the rule writer has to be aware of priority values in order to achieve the desired result.

Also note that DA_7 does not halt the rules engine. In a case where we have a male driver of 71 years old, the rules engine first assign 'Senior' to the Driver class, and consecutively overwrites this value with 'Typical Driver'. Now we also have to make sure that rule 'DA_3' must be executed after DA_7 and DA_8. If DA_3 would fire before, we make the incorrect conclusion that a 71 year old senior is eligible without checking his training certificate.

A second problem related to the priority and overwriting conclusions is that a rule audit report would show incorrect results. So please use rule priorities careful. We will show below that the Driver Eligibility policy actually don't require priorities.

Finally, the generated rule graph shows two disjoint rule networks. We have to wonder what happened with the rules that determine the 'Training Certification'. Also how is the DUI related to the Training Certificate? It seems that the example is not a complete implementation of the specification. Visualizing a rule policy in a complete rule graph does make the business rules code review an easy task.

Again, Microsoft example was only illustrating the technical aspects of WF rules. And the example shows how you can achieve First Order Logic with WF rules. (For All Drivers do...)
I changed the Driver Eligibilty policy to remove the contradiction and remove the priorities to keep the rules 100% declarative. We let the rules engine decide which rule should be executed next. Here is a produced report of my rewrite (PDF, XPS).

There are no disjoint rule graphs, no self contradictions within the rules, and no rule anomalies among rules. We do discover some incompleteness. E.g. is a Female of 24 years old eligible?
This incompleteness can be a misinterpretation of the use case specification, or an actual incompleteness in the specification. But with this rule report it's very easy to get these issues clarified.

Wednesday, July 04, 2007

WebCast on Advanced Scenarios of WFRules

Kavita (Microsoft) will give a presentation this Friday (7/6/2007) about some advanced scenarios using rules with Windows Workflow Foundation.

During this presentation you will see screenshots of Acumen Business Rule Manager as an example of an advanced Business Rules solution!

The Rule Manager provides the additional functionality of Rule Authoring, Rule Repository Rule Verification & Validation. Only by empowering the business users with a complete business rules tool set, you will achieve a truly agile business policy that becomes transparent within your organization.

Here are the details of the Live Webcast:

Event Name: Webcast: Introduction to Windows Workflow Foundation Rules - Part II

Start Date: 7/6/07
Start Time: 1:30 PM (GMT-05:00) Eastern Time (US & Canada)
End Time: 3:00 PM (GMT-05:00) Eastern Time (US & Canada)
Audio conferencing: +1 (866) 500-6738
Participant code: 7545634
Presenter code: 9070863

Click on this link for more information regarding this Webcast

Monday, June 04, 2007

Rule Manager 1.5.0.x is released

The new Rule Manager (1.5.0.x) is released! There are many new features and enhancements. Here are some of the highlights:
  • Rule Validation; in the interactive rule map you can let the rules engine resolve any term.
    This starts an animated goal seeking process. The default waiting time is 0.5 sec. You can change this in the debug options.
  • Panning and zooming of the interactive rule map.
  • Creation of business rules and business terms are completely accessible during the trial period.
  • Export your rule policy to Windows Workflow Foundation, and you see the rules executing on top of Microsoft's Forward chaining rules engine. By default the rule tracing is on. You can see the rule execution in the output console of Visual Studio.
Existing users can follow the internal update wizard (except that you need the .NET Framework 3.0)

New users can start the installation wizard that is available here.

Thursday, May 17, 2007

WebCast about Windows Workflow Foundation Rules

Tomorrow, there is a free webcast by Kavita Kamani (Microsoft) about using the rules engine that is part of Windows Workflow Foundation. You can register for this event here.

Microsoft's rules engine is a bare bones forward-chaining rules engine. The rule engine can also be invoked without using the workflow engine. When you export a business rule policy from the Rule Manager, it will generate a C# solution that illustrates how rules are invoked without the workflow engine.

Start Date: 5/18/07
Start Time: 2:00 PM (GMT-05:00) Eastern Time (US & Canada)
End Time: 3:30 PM (GMT-05:00) Eastern Time (US & Canada)

Wednesday, March 14, 2007

Importing Biztalk rules and export to Windows Workflow Foundation

The new Rule Manager (version 1.4.0.50) is released!



With just a few mouse clicks, the Rule Manager from Acumen Business imports a BizTalk rule policy and export the rules to the Windows Workflow Foundation format.



The export generates a complete Visual studio solutions. This includes the .rules file, the Business Object model and the code that calls Windows Worklow Engine.




And voila, here is the results of a CarDiagnosis example with the recommendation that I have to get 'Fuel'

It's just a console output, but you hopefully get the idea. It's an executable solution that can be incorporated into the IT infrastructure.

I don't think we can make it any easier.

What you need:

  • Microsoft BizTalk 2006
  • .NET 3.0 (this includes Windows Workflow Foundation)
  • Acumen's Rule Manager with the BizTalk and Windows Workflow Foundation adapters

What you get:

  • Your BizTalk rule policy converted to Windows Workflow Foundation. The best part is that the Windows Workflow Foundation is free and is included in the .NET 3.0 framework.

Friday, January 26, 2007

What is missing in WWF rules

There is an interesting discussion going on how WWF rules is different from a BRMS solution. Although some comparisions are more related to the comparison with QuickRules.NET, there are quite a few valid points.

The argument list WWF Rules vs. BRMS rules will soon have to be rewritten. Acumen Busines is in the process of providing their tool components for WWF. This will include
  • Rule Repository
  • Rule Validation and Verification
  • Rule Animation
  • Rule Reporting

Stay tuned.

Saturday, January 14, 2006

BizTalk v.s. Windows Workflow Foundation

I just got the MSDN in the snail mail box and was reading this morning about the new Windows Workflow Foundation (WWF). There is a strong similarity with Biztalk in regards to the Workflow part of BizTalk.

There are some other comments about this comparison. See Darren . Combine this with the news that Scott Woodgate has left the project, I wonder where the BizTalk product is heading to.

Brian Loesgen has published a nice comparison table of BizTalk features v.s. Windows Workflow Foundations.

xdg-open; vscode acts as default application for html

Opening html files stopped launching the browser, but launched the vscode application. > xdg-mime query default text/html code-url-h...