and I notice when I use Invoker and call invoker.Invoke() directly the GUI won't refresh while running. What other difference are there?
Activity Data Model Moves data into and out of an activity.
Workflow Run-time Engine A WorkflowApplication for explicit control over the execution of a single workflow instance.
Running a workflow using the WorklfowInvoker is an synchronous call. So it will block as long as your workflow is running. It is intended for short running worklfows and unit testing of activities and doesn't support the Workflow Instance Store.
The WorklfowApplication is asynchronous and executes workflows as an asynchronous task, so the Run only schedules execution and returns. ON what thread it executes depends on the SynchronizationContext used, the default is using the ThreadPool. Status updates, like the workflow completing are done through callbacks you set. It also supports the Workflow Instance Store.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With