0
votes

Is it possible to create and configure Windows Workflow Foundation rules from an ASP.Net application? There is the System.Workflow.Activities.Rules.Design.RuleSetDialog for Windows Forms projects, but is there some equivalent for ASP.Net MVC projects using the Razor view engine?

Anyway, I need to be able to create rules from within an ASP.Net client, save them in a database and evaluate the rules in a service later on. Is there perhaps something new in WF4 that can help me with this?

1
That's a 3.0 component, not WF4. Rules were deprecated in 4, but still supported now for 3.0-based workflows. Its not easy to tell, but (for UI components at least) for the fact that 4 UI is WPF based, whereas 3 is Forms based. If you want to use this for 4, go ahead and put the tag back on, but the answer is "you're headed in the wrong direction" - user1228
@Will, I know that it is a WF3 component, but it's not quite clear what the equivalent in WF4 is. If there is any? - Joel
They are not applicable at all in 4. So its hard to come up with an "equivalent." If you are working on WF4 workflows, forget about "rules." - user1228
@Will, Ok, that is good to know. Do you know any good .Net 4 approach for creating a rule engine? I liked the idea of using System.Workflow.Activities.Rules, but it doesn't feel good to use depracated APIs - Joel
Workflows are a rule engine. I'm not sure what else to say. - user1228

1 Answers

1
votes

I can't find any .NET 4 samples, but there is a .NET 3 sample for creating RuleSets using the object model. I would assume you need to create your own custom UI for it and create your RuleSets via the object model to handle this in a web application.

Referenced .NET 3 Samples - The sample I'm referring to is called "Creating rules using the object model"