Question

Before asking a question, and before you all get mad because there are a couple of similar questions, I would like to explain a bit what are project requirements. You will see that question differs from all others.

  • Users will create workflows using ReHosted WPF application and upload xaml files to web application we will provide.
  • Entry points to start workflow execution is in that web application. They can use UI or consume API function from their own application.
  • Workflows will be long-running.

I'm aware of different possibilities for hosting.

Simplest would be to host it within ASP.NET web application, but as we are not aware what kind of workflows users will upload, IIS AppDomain recycling could break workflow thread execution.

WCF Workflow Services look nice, but the fact users will upload their own xaml workflow definitions makes things more complicated. Looks like we would have to create something like core workflow, exposed as WCF service, and that workflow will load and execute inner workflow (xaml customers uploaded). Not sure how in parameters would be passed to inner workflow in that case.

Third option, and the one looking best to me, is hosting workflow execution in Windows Service. Communication between web application and window service can go over MSMQ. Downside of this solutions is maybe boylerplate code to ensure good communication between web app and win service.

Am I missing better solution? In case you need more details, just post a comment.

Était-ce utile?

La solution

I have similar requirement and have dome long discussion With "The problem solver".

which one is better architecture for the WF4.0?

Now my conclusion is to develop Workflow as a workflow services hosted on IIS.

You can follow these two approaches.

  1. Divide workflow requirement into smaller activities they can be an independent XAML activities and to create workflow drag drop those on Workflow Service (xamlx). Relate these on InArgument and outargument and correlation context where ever required.
  2. Create and store workflow in db and load them dynamically. Excellent link-- http://blogs.msdn.com/b/appfabric/archive/2011/06/16/how-to-load-wf4-workflow-services-from-a-database-with-iis-appfabric.aspx
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top