[WF4]Use CancellationScope Activity

As we know that parallel will not finish execution until all its child branches finished. Sometimes, we want to break the parallel if one of its branch finished execution and cancel other branches. To do this, we can use CancellationScope activity. In this sample, we want to order products from two dealers(Dealer A and Dealer B) at the same time. in this situation, the two dealers are kind in a competition , the one who ship the product faster than another one win the business.

blog comments powered by Disqus