[cylc]
    [[events]]
        abort on stalled = True

[scheduling]
    cycling mode = integer
    initial cycle point = 1
    final cycle point = 3
    [[graph]]
        P1 = """
            fin[-P1] => showdown

            showdown:good => good
            showdown:bad => bad
            showdown:ugly => ugly
            showdown:good | showdown:bad => ! ugly
            showdown:good | showdown:ugly => ! bad
            showdown:bad | showdown:ugly => ! good

            good | bad | ugly => fin
        """
[runtime]
    [[root]]
        script = true
    [[showdown]]
        script = """
            if ! (( ${CYLC_TASK_CYCLE_POINT} % 3 )); then
                cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" 'The-Good'
            elif ! (( ( ${CYLC_TASK_CYCLE_POINT} + 1 ) % 3 )); then
                cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" 'The-Bad'
            else
                cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" 'The-Ugly'
            fi
        """
        [[[outputs]]]
            good = 'The-Good'
            bad = 'The-Bad'
            ugly = 'The-Ugly'
