Pattern 9 (Discriminator)


    <concurrence
        sync="generic"
        count="1"
        merge-type="mix"
        remaining="forget"
    >
        <participant ref="alfred" />
        <participant ref="boris" />
        <participant ref="carlos" />
    </concurrence>

The 'generic' sync expression is used to implement the discriminator pattern. In this example the 'remaining' attribute is set to 'forget' which means that the two participants that replied too late will not receive a cancel notification. They will be able to reply, but this will not have any further effects on the flow (which may have meanwhile terminated).

Pattern 9a (N out of M join)

This pattern is a generalization of the 'discriminator' pattern.


    <concurrence
        sync="generic"
        count="2"
        merge="first"
        merge-type="override"
        remaining="forget"
    >
        <participant ref="alfred" />
        <participant ref="boris" />
        <participant ref="carlos" />
        <participant ref="dieter" />
    </concurrence>

In this example, as soon as 2 participants reply, the flow will continue with the workitem coming from the first participant that did reply.