https://flyte.org logo
#ask-the-community
Title
# ask-the-community
e

Eduardo Matus

03/13/2023, 2:27 PM
what would be the best way to call 2 tasks depending how another one ends? Currently I’m using conditional but then can trigger just 1 task
k

Kevin Su

03/13/2023, 2:57 PM
you could use subworkflow in the conditional task. like
Copy code
return (
        conditional("fractions")
        .if_((my_input > 0.1) & (my_input < 1.0))
        .then(subwf1(n=my_input))
        .elif_((my_input > 1.0) & (my_input <= 10.0))
        .then(subwf2(n=my_input))
        .else_()
        .fail("The input must be between 0 and 10")
    )
69 Views