# prefect-community

Yupei Chen

06/28/2022, 6:56 PM
I am following the example from the triggers documentation:
For example, suppose we want to construct a flow with one root task; if this task succeeds, we want to run task B. If instead it fails, we want to run task C.
However when I run my flow, it looks like the root task is being run twice. This is not what I expected, how can I achieve the root task only running once? Edit: Figured it out. Store the mapped result into a variable and pass that into the upstream_tasks parameter.