Hi everyone — I have a tiny flow I’m using to star...
# ask-community
b
Hi everyone — I have a tiny flow I’m using to start other flows, and I’m passing a “run_name” argument to the “create_flow_run” method but the “run_name” depends on parameter and it’s not working as I expected. Can anyone help? I feel like I need to “delay” the “resolution of what ‘scope’ is” but not sure
a
Passing parameter values as run name is currently not supported. I will open an issue for it, thanks for raising this!
@Bruno Murino Here is an issue - there is a workaround you could use to solve it and I showed it in the issue
Workaround:
Copy code
from prefect import Flow, Parameter, task
from prefect.tasks.prefect import create_flow_run


@task
def get_curom_run_name(param: str):
    return f"API {param}"


with Flow("02_parent_flow") as parent_flow:
    param = Parameter("user_name", default="world")
    child_flow_run_name = get_curom_run_name(param)
    flow_run_id = create_flow_run(
        flow_name="01_child_flow",
        project_name="xyz",
        parameters=dict(user_name=param),
        run_name=child_flow_run_name,
    )
b
oh nice! Let me try that! Thanks Anna!
worked like a charm
thank you very much!
👍 1