String run_input for resume_flow_run #20733
-
|
According to the docs, the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hey @gsakkis! When 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 ( I'll submit a PR to clarify this behavior in the docs. |
Beta Was this translation helpful? Give feedback.
Hey @gsakkis!
When
pause_flow_run(wait_for_input=str)is called with a built-in type likestr, Prefect internally wraps it in a dynamically generatedAutomaticRunInputPydantic 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:
So the pattern is:
The same applies to any other primitive type (
int,float, etc.) — always wrap…