Hi Prefect community :wave: In old prefect it was ...
# ask-community
t
Hi Prefect community 👋 In old prefect it was possible to programatically create a flow with these methods:
Copy code
flow = Flow('a-flow')

flow.add_task(task_1)
task_1.bind(
    flow=flow,
    some_task_param="Hi",
)
Basically i want to dynamically build a flow out of X tasks. As far as I can see now the only way to create a flow now is to point it at an already existing function. 😞 I’m sure you can create a flow function that looks up in db and runs tasks depending on the results, but i don’t want to resolve that at runtime, the old way let us do it only once at creation time. I can’t figure out how to do this in new prefect 2, does anyone have any good ideas to how this can be accomplished?