开发者

Get a reference to the workflow from inside the workflow

开发者 https://www.devze.com 2023-03-29 03:57 出处:网络
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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号