문제

and I notice when I use Invoker and call invoker.Invoke() directly the GUI won't refresh while running. What other difference are there?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top