As we know, the Parallel activity will not finish execution until all of its child branches have finished execution. Sometimes, we want to break the parallel if one of its branch finishes execution and cancel the other branches. To do this, we can use a
CancellationScope activity. In this task, we want to order products from two dealers (Dealer A and Dealer B) at the same time. In this situation, the two dealers are in a competition, and so the one who ships the product faster wins the business.
Create a new Workflow Console Application project and name it
Add to the project a new class file and name it