Error handling templates for multi-threaded applications using WF?

I wrote a long detailed question, but simply refused it in favor of a simpler question, to which I could not find an answer.

Brief description of the application:

I have a WPF application that spawns multiple threads, and each thread runs its own WF. What are some of the best ways to handle errors in threads and WFs that allow the user to interact with the GUI? I definitely plan to handle any lower level exceptions in the stream because I don't want the stream to exit.

Summary of questions:

  • How did you implement the connection between WF and the thread that runs it? There is WorkflowTerminated, but I do not want the workflow to exit - I need to fix the problem and continue it. I suppose the only option is to use FaultHandler, but it was interesting if there is another way to do this without using an activity block. I hope there is infrastructure that I have not found yet.

  • The error from WF should get into the stream, which then should display the error in the graphical interface. The user will then make a logical choice for recovery, which must then be sent back to the stream, and then to WF. Again, is there something existing that I should look at?

/ , , , , . .:)

+3
2

. :

, . ViewModel, . .

- . , () . , GUI . .

, , , . : 1) , 2) . , .

( ). , , , . , . , , . - ?

0

, WPF, - , . , , , . , , , . , , , .

+1

Source: https://habr.com/ru/post/1732207/


All Articles