Creating interactive user interfaces within workflows
useScreenFunctions
hook to interact with the workflow system.
get_props
function. In this example, the name
prop comes from the user_name
field returned by the "prepare-greeting"
step.
useScreenFunctions
hook, which provides two essential functions:
handleComplete({ result: data })
- Completes the screen step and passes data
to the workflow. The workflow continues to the next step.handleCancel()
- Cancels the screen step and stops workflow execution.handleComplete()
is called, the data passed becomes the step’s outputctx.get_step_result("step-id")
handleComplete()