I want my workflow to Abort开发者_如何学JAVA after failing some tests.
How can I get a reference to the workflow I am in so that I have something to call abort on.
I'm, going to try passing in a reference to the workflow in the IDictionary as I start the workflow but I would have thought that the Context had a reference to the workflow inside it somewhere.
Any thoughts? Richard
Do you want to Abort or Terminate your workflow?
Normally aborting is only done when an unhanded error occurs and you want to restart from the last state in the persistence store. You do that by throwing an exception using the Throw acticity, not catching it in your workflow and specifying an UnhandledExceptionAction of Abort.
When an invalid state is detected in a workflow termination is more common. You can do that using a TerminateWorkflow activity.
精彩评论