In my introductory post I had focused on giving a brief overview of workflow foundation-4 highlighting what is new and how things have changed from 3.5 to 4. You can check this out here . This post will be a very simple one in which I am going to focus on how to execute workflows. Executing workflows is very simple in WF4. There are basically two approaches - Use WorkflowInvoker Use WorkflowApplication Using WorkflowInvoker is the simplest of the two approaches. Some of the disadvantages of this method are - You cannot persist the workflow instance You cannot unload or resume bookmarks You can execute the workflow synchronously or asynchronously both using WorkflowInvoker. To execute the workflow synchronously using the WorkflowInvoker you simply call its static method Invoke and pass the workflow object to it. Here is a simple example - Sequence seqWorkflow = new Sequence { Activities = { new WriteLine {Text = "Hello"}, new WriteLine {Text = "World using WorkflowInvoker...
Welcome to learn from my learnings. This is where I share my learnings so that others can benefit too and I can reference it in future. I publish posts, helpful notes or cheat sheets on various software technologies.
Abhy Nadar. Sr. Architect @ 3Pillar Global.