Edit: Figured it out, it should be `with case(...)...
# ask-community
j
Edit: Figured it out, it should be
with case(...)
not
if case
. Having a strange issue where when running a flow it warns that a Parameter was declared but not added the Flow, and when I try to run the flow with the parameters established it errors out saying that the parameters are unexpected. This is the structure of the flow:
Copy code
with Flow(name="My Flow") as flow:
    if case(Parameter("do_something", default=False), True):
        result_of_thing = run_thing()
    else:
        result_of_thing = run_another_thing()
Copy code
from flow_definition import flow
flow.run(parameters={"do_something": True})
2