A few customers have hit a speed bump when trying to setup persistence with WF4 Beta1. We have multiple sql scripts included (for 3.5 persistence and 4.0 persistence). The problem is that depending on your WF application model in Beta1 you have to execute different scripts (we’ve fixed this in Beta2).
For WorkflowServiceHost usage, use these SQL scripts:
- C:WindowsMicrosoft.NETFrameworkv4.0.20408SQLenSqlPersistenceProviderSchema40.sql
- C:WindowsMicrosoft.NETFrameworkv4.0.20408SQLenSqlPersistenceProviderLogic40.sql
For WorkflowInstance usage, use these SQL scripts (note the lack of “40”):
- C:WindowsMicrosoft.NETFrameworkv4.0.20408SQLenSqlPersistenceProviderSchema.sql
- C:WindowsMicrosoft.NETFrameworkv4.0.20408SQLenSqlPersistenceProviderLogic.sql
Also make sure that the connection string in your application matches the database you created.
Dear kenny,
i need that inside a workflow istance i call an activity that i want load from xaml file at execution time. With WF 3.5 that was possible, now with wf 4.0 i have not found solution. Can you help me?
when i schedule an activity i receive an exception that tell me that is necessary call a children but i can’t create a children at time of execute.
Can you hel me?
Correct, we don’t let you dynamically create children as part of the same workflow. That said, this restruction was in place for 3.5 as well. If you want to send me the 3.5 and 4.0 code offline, I can take a quick look. The recommended approach for such a dynamic case is to use a separate workflow, and depending on your persistence needs, you can either use WorkflowInvoker.BeginInvoke(), or a service boundary to execute the dynamic workflow.
kenny, i have sent you an email with code, probably mail isn’arrived for wrong address..please give me your correct email address or send me a mail to nico.grilli@sparksoft.it so i can resend the question. thankyou very much
Are you saying that you can only have persistence for either WorkflowServiceHost or WorkflowInstance in a particular database?
You can use the same database, but in Beta1 they use different tables. This is all fixed in Beta2
Ah, okay. Thanks for the clarification. Now to get playing…