Hello,
When deploying a flow with 2 subflows. Is it possible to trigger manually (from the UI or the API) only 1 subflow among the 2 subflows ?
Thank you
d
Deceivious
07/12/2023, 8:44 AM
Its up to the developer to write codes in such manner. Prefect by default does not allow triggering subflows.
Deceivious
07/12/2023, 8:48 AM
Copy code
@flow
def subflow(country:str):
result=do_something_with_country(country)
return result
@flow
def main_flow(countries:str=None):
if countries is None:
countries=["USA","Mexico","UK","Australia"]
else:
countries=countries.split(",")
for country in countries:
sub_flow(country)
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.