3
votes

Has any one used WF Rules engine outside workflow activities WITHOUT using Rules Editor or CodeDOM?

Scenario

I am trying to use the Rule engine that ships with Workflow foundation classes with .Net Framework for a web based application. We evaluate hundreds of Validation Rules before proceeding towards a calculation engine for a complex calculation.

I have gone through many blogs which state how to use Rules engine without having to have Workflow Activities including http://cgeers.com/2008/01/26/using-rules-outside-of-a-workflow/. However they all eventually end up using a Rule Set Editor for defining rules. I want to declaratively define rules in an XML file

What I am looking for

  1. I need to be able to specify Rules in simple XML without dealing with CODEDOM. CodeDOM seems to be very complex to write.

  2. I should not be dependent on RuleSet Editor for defining rules.

Any thoughts any one ?

3
What version of WF are you using ? - Jayantha Lal Sirisena
Jayantha, We are using .Net 4.0 for the application and WF4 (v4.0.30319) for Workflow classes. - Srikanth

3 Answers

0
votes

Don't know what kind of rules you are evaluating, but if you search a good open source rule engine, here is one.

0
votes

Have a look at the following article for a strategy (not a solution) to approach the problem.

http://code.msdn.microsoft.com/windowsdesktop/Creating-Rules-Using-the-23c5d561

0
votes

The serialization format for WF Rules is CodeDom.

It does not have another serialization format built-in.

If you want an alternate XML representation, you would need to create a tool to map between the representations.