views:

75

answers:

4

I want to develop a feature for an application, that make it possible to create dynamic rules like you can do it in Outlook. I want that every user can create rules to automatize precesses. Those rules must do something before an action, after an action and to a certain time/day.

Possible rules can be like:
- If process >= 99% -> Set it as finished
- Before a user insert a new Item -> Send a mail to "[email protected]" and wait for the approval
- After a user change the state of an item -> Change the state of all items with the equals name
- Set every sunday on 4:00am the state of all items to the state "old items"

I try to do this with the Workflow Foundation rules engine but I don't know how can I realize all requirements.
Is it possible to do this with WF or should I use another tool?

A: 

I once designed such system using pure OOP. Rule consists of one or more conditions and one or more actions. Each condition type and action type are classes. Condition classes know how to check external world. Action classes know how they are "executed", i.e. what should be done to take an action. Each class knows how to represent itself visually (for visual rule designer).

If you want simple conditions to be joined by only AND or OR operation, then you can set this operation in rule properties. If you want more complex condition representation, I'd suggest using some boolean evaluator engine and represent each rule in the condition text as it's ID. Eg. "(RuleA_ID AND RuleB_ID) OR RuleC_ID".

Eugene Mayevski 'EldoS Corp
A: 

Can you give me an example or do you have a tutorial. I don't understand how you mean this.
Simple conditions with AND and OR operation are sufficient.
I want that every user can do the rules for him and not for all users. Also I want to create a editor to create the rules (like in Outlook).

Peter Mueller
A: 

Opensource Rule Engines. You can use them or look at their source codes for inspiration. Rule Engines

Holystream
A: 

This opencource rule engines can not do that what I want. The rule engines do not can act before and after actions and can not handle actions.
I try it with the very powerful Workflow Foundation rule engine, but can't find a way how I can implement it. Is there any way to do it with the WF?

Peter Mueller