Multi-choice

In this example, more than one of several possible branches in a process are followed. This example can be implemented using either a gateway element or event receivers that are used as process start points.

Gateway implementation

This implementation includes a process variable that contains information about which branch to execute and a gateway that contains the branches that can be executed. Each branch has the following characteristics:

  • The first operation in each branch is an execute operation that the Decision Point service provides.

  • The route that originates at the execute operation leads to the activities that are to execute in the branch.

  • A condition is attached to the route to determine whether the activities should be executed. If the route is valid, the activities are executed. If the route is not valid, the branch completes and the activities are not executed.

    In the following illustration, activity A, activity B, or both activities are executed.

Event implementation

This implementation includes one main process and several subprocesses. The subprocesses are the possible branches that are followed. An asynchronous event type is used to determine which subprocesses are executed at run time:

  • The main process throws the event. Event data is included in the event information.

  • The subprocesses each receive the event as a start point. The filters on the start point determine whether the subprocess is executed.

    In the following example, the main subprocess throws an asynchronous event, and the subprocesses use the event as a starting point. The filters on the start points of the subprocesses determine whether the subprocess is invoked, and therefore whether activity A, activity B, or both activities are executed.

    A.
    Main process

    B.
    Subprocess containing activity A

    C.
    Subprocess containing activity B

// Ethnio survey code removed