We are using Windows Workflow engine for our .NET 4.5 based ASP.Net application. The Windows Workflow application is deployed as an IIS application and is configured for SQL persistence with the connection information specified in the web.config file. We now want to move this application (along with the Workflow engine) to the cloud.
Regarding this cloud migration, we are somewhat confident about the following decisions that we made for our ASP.Net (non Windows Workflow) application:
However, we are not very sure on how to migrate the Windows Workflow application to the cloud. As I understand, we have the following choices:
With #1, we are primarily concerned about the performance as the load increases on this single database. With #2, the concern is web application scalability since it does not seem right to have 1000 web applications for 1000 customers.
That leaves us with option #3, which we think is the right way to go. However, we are not sure if this can be done in Windows Workflow or not.
So the question is, can a single instance of Windows Workflow web application be somehow configured or programmed to talk to multiple SQL persistence databases? If yes, how can we achieve that?
Thanks!
I never do it myself, but I think that you can do this by implementing your own PersistenceService
. To do this, derive from WorkflowPersistenceService
abstract class, which has a methods like SaveWorkflowInstanceState
/ LoadWorkflowInstanceState
.
In this methods you can access WorkflowInstanceId
property of workflow. I think that you can use this property to decide where to store this specific workflow instance. To be able to load (restore) workflow from proper database you will need to implement some mapping like this: WorkflowInstanceId
: DatabaseId
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.