What are Sample Workflows?
Step
to define a normal step. Normal steps takes a body function that is called when the step is reached.
lambda
keyword) or as a separate function.
Body functions can use the context (ctx
) to access data from previous steps or external systems. Read more in the context section.
The return value of each function can be accessed by subsequent steps using ctx.get_step_result("step-id")
.
.tsx
file)ScreenStep
in the workflow that points to the React component by file pathresult
field of the handleComplete
function. In the example above (see greeting-screen.tsx
), the return value will be the string "confirmed"
.
See the screens section for more information on how to create and customize screens.
ctx.get_step_result("step-id")
.
IMPORTANT: All outputs from workflow steps must be JSON serializable. This is critical for Sample Workflows to function properly, as step outputs are stored and passed between steps in a serialized format.
string
, number
, boolean
, null