Hi
How can we define WPF Service in Workflow?
WPF Service in Workflow
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hemant KumarRank #1,202 · 1.5K reputationPosted Nov 13, 2011, 1:56 AM EST
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.