Synchronizing merge

This example is a synchronization that follows the construct described in the multi-choice example. The branches that execute during a multi-choice construct converge at a single activity, and the activity is executed only when all of the executed branches are complete.

The implementation of this example depends on whether you used gateway elements or events to implement the multi-choice construct.

Implementation for a gateway multi-choice

The implementation of the synchronizing merge construct for a gateway multi-choice construct includes the following characteristics:

  • The activity to execute after each branch executes follows the gateway.

  • The value of the Control Type property of the possible gateway is set to AND-WAIT.

    The following illustration shows the activity that follows the gateway and is executed only after all of the branches in the gateway are complete.

Implementation for an event multi-choice

To implement a synchronized merge for a multi-choice construct that is implemented using events, each subprocess needs to send a message back to the main process to indicate that they are either complete or that the subprocess was not executed:

  • The start point of each subprocess does not filter the event data. Instead, an execute operation of the Decision Point service determines whether the activities in the subprocess are executed.

  • Each subprocess throws an asynchronous event as the final activity of the subprocess.

  • The event throw carries the name of the subprocess that it belongs to as part of the event data.

  • The main process contains a gateway with a branch for each subprocess, and each branch includes a receiver for the event that each subprocess throws. The Control Type property of the gateway is set to AND-WAIT.

    The following illustration shows the main process that includes the mergeAB activity that executes after each subprocess is complete. The illustration also shows the subprocesses that throw the event to signal that the activity in the subprocess is either complete or did not execute.

    View full size graphic
    A.
    Main process

    B.
    Subprocess containing activity A

    C.
    Subprocess containing activity B

// Ethnio survey code removed