Skip to content
Discussion options

You must be logged in to vote

Hey @gsakkis!

When pause_flow_run(wait_for_input=str) is called with a built-in type like str, Prefect internally wraps it in a dynamically generated AutomaticRunInput Pydantic model that has a single field named "value". So the flow run is actually waiting for a model like {"value": <your string>}.

To resume it, pass the dict with that "value" key:

resume_flow_run(flow_run_id, run_input={"value": "your string here"})

So the pattern is:

# Pausing side (inside your flow):
user_input = pause_flow_run(wait_for_input=str)


# Resuming side (external caller):
resume_flow_run(flow_run_id, run_input={"value": "hello"})

The same applies to any other primitive type (int, float, etc.) — always wrap…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gsakkis
Comment options

Answer selected by gsakkis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants