Hi
How can we define WPF Service in Workflow?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hemant KumarPosted Nov 13, 2011, 6:56 AM
You can do this but the are some important restrictions. First of all you need to stop and restart the WorkflowServiceHost with the new workflow definition. Secondly all existing workflow instances in a persistence store will become invalid. In short this is only practical is there are very few and only short running workflows without persistence.
If you go this route you can just overwrite the XAMLX file, as it isn't compiled but used as is, and restart the WorkflowServiceHost to pick up the changes. Alternatively you can save the workflow to a XAML file, or any stream for that matter, and load it using the ActivityXamlServices. Next you can instantiate a WorkflowServiceHost using this workflow definition.