Skip to content

Commit

Permalink
Document "Cancelling Discriminator" wflow pattern
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
jmettraux committed Jan 8, 2024
1 parent 2e4da77 commit a65d939
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions doc/patterns__control_flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If you disagree with a solution proposed here, you are much welcome to [raise an
* [Multi-Merge](#abs-multi-merge)
* [Structured Discriminator](#abs-structured-discriminator)
* Blocking Discriminator
* Cancelling Discriminator
* [Cancelling Discriminator](#abs-cancelling-discriminator)
* Structured Partial Join
* Blocking Partial Join
* Cancelling Partial Join
Expand Down Expand Up @@ -255,10 +255,29 @@ sequence
triage _
```

The "concurrence" expects one reply and then cancels the remaining branch.
The "concurrence" expects one reply and then forgets the remaining branch.

[wp/explanation](http://www.workflowpatterns.com/patterns/control/advanced_branching/wcp9.php) | [wp/animation](http://www.workflowpatterns.com/patterns/control/advanced_branching/wcp9_animation.php) | [top](#top)

### Cancelling Discriminator
<a id="abs-cancelling-discriminator" />The example given for this merge:

> After the extract-sample task has completed, parts of the sample are sent to three distinct laboratories for examination. Once the first of these laboratories completes the sample-analysis, the other two task instances are cancelled and the review-drilling task commences.
```python
sequence
extract_sample _
concurrence expect: 1 remaining: 'cancel'
examine_sample 'laboratory 1'
examine_sample 'laboratory 2'
examine_sample 'laboratory 3'
review_drilling _
```

The "concurrence" expects one reply and then cancels the remaining branches.

[wp/explanation](http://www.workflowpatterns.com/patterns/control/advanced_branching/wcp29.php) | [wp/animation](http://www.workflowpatterns.com/patterns/control/advanced_branching/wcp29_animation.php) | [top](#top)

<!-- --------------------------------------------------------------------- -->
## Multiple Instance Patterns

Expand Down

0 comments on commit a65d939

Please sign in to comment.