0

我有一个 3 的流程图ReceiveActivity

例如 ReceiveActivity1(StartProcess)->ReceiveActivity2(ApproveByBoss)->ReceiveActivity3(FinalizeProcess)

FinalizeProcess当通过 WCF 调用方法但ApproveByBoss从未为特定的工作流实例调用方法时,是否有任何方法可以“教导”工作流存在一些特殊行为(例如抛出异常) ?

当然,可以删除一个自定义活动,该活动将在 Receive 触发后验证一些“预期的”持久状态。但我认为它使工作流程修改不那么灵活。

4

2 回答 2

0

并非没有弄乱你的WF。但是你可以看看这个:

http://blogs.msdn.com/b/routingrules/archive/2009/12/30/routing-service-features-error-handling-part-2.aspx

于 2013-03-07T16:01:03.767 回答
0

Is there any way to "teach" workflow that there is some special behavior (for example Exception thrown) when FinalizeProcess method is called via WCF but ApproveByBoss was never called for specific workflow instance?

How can you proceed to FinalizeProcess if ApproveByBoss is not finished. The WF will throw exception if implemented properly. In order to achieve your requirement you have to use Correlation. Check this nice article.

于 2013-03-01T11:31:57.220 回答