0

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?

Joel
  • 8,502
  • 11
  • 66
  • 115
  • 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" –  Oct 26 '12 at 14:30
  • @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 Oct 29 '12 at 09:17
  • 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." –  Oct 29 '12 at 12:44
  • @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 Oct 29 '12 at 13:01
  • Workflows *are* a rule engine. I'm not sure what else to say. –  Oct 29 '12 at 13:02
  • @Will. Haha ok. I'm confused, so I guess I've got a bit of reading to do – Joel Oct 29 '12 at 13:12

1 Answers1

1

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"

Greg Andora
  • 1,372
  • 2
  • 11
  • 17