Exit workflow?

Is there a way to exit the workflow more gracefully than throw it away InvalidWorkflowException? I am writing an activity (which interacts with an SQL database) that should be short if the operation is not performed.

I know that this can be divided into several steps / actions and link them, but can I set the status of my execution from the inside?

Something like this.currentContext.SetState(Cancelled)?

+3
source share
3 answers

, , . , . , . , .

, .

+2

, Windows Workflow, NativeActivity NativeActivityContext.CancelChildren?

MSDN: .

+2

I think this is the same situation as in any other program. You will throw an exception if an error occurs in your activity, and you will use the try / catch operation to handle it and gracefully terminate WF.

+1
source

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


All Articles