Question

I want to make an Azure website and i use WWF on it. this website serve many customers and i decide to use federation in the Azure SQL to handle customers data, but i have a big problem now because i want to use the persistence service of WWF to save the workflow instances in the azure SQL with the SqlWorkflowInstanceStore and these instances must be distinguished by CustomerId to know it is belong to whom.

PS: I have many instances for every customer, and every customer has its own workflow.

Was it helpful?

Solution

I do not think you can federate the Windows Workflow Foundation tables. The tables come in a predefined schema (more info here). Even if you were to manually add the customerID column to the WWF tables and federate on it, you will have to take into account that you still need to issue the USE FEDERATION statement before running any command on federated tables and the SqlWorkflowInstanceStore class doesn't do that.

So, if you are going to use a federated SQL Azure database, probably the single option would be to create WWF tables in the root database. Alternatively you can use a separate SQL Azure database for the purpose of WWF persistence.

OTHER TIPS

I am not familiar with WF. However I don’t see any conflictions between what you want to achieve with SQL Azure federation. Base on my understanding, you can use CustomerId in the federation on clause when you create the table.

Best Regards,

Ming Xu.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top