I am hoping to have a task be blocked by an upstream task whose execution depends on a parameter, and that does not necessarily provide any input to the downstream task. With my current flow structure the downstream task is only executed when my parameter is set to
false
. How can i get it to execute in both cases where the parameter is
true
or
false
? Sample code in thread
Jacob Goldberg
09/17/2021, 4:49 PM
Here is some sample code
Copy code
with Flow(name="Example Flow") as example_flow:
boolean_parameter = Parameter("strict_transfer", True)
with case(boolean_parameter, True):
my_task_function = some_function(some_option=True)
with case(boolean_parameter, False):
my_task_function = some_function(some_option=False)
some_other_task_function(upstream_tasks=[my_task_function])
Jacob Goldberg
09/17/2021, 4:50 PM
Notably, i do not need to store any output from
some_function()
, but my understanding was that I need to assign it to a variable to feed it to the
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.