Understanding the workflow context and how to access data between steps
ctx
) that provides essential information and utilities for the current workflow run. This context allows steps to communicate with each other, access user information, and interact with the backend system.
WorkflowRunContext
class, which provides the following key capabilities:
backend_token
: Authentication token for making API calls to the SampleHC backendcurrent_user
: Information about the user who initiated the workflow (dict with name
and email
fields)resume_data
: Data used when resuming a suspended workflowscope
: Additional scoped data for the step that you’re on. For example, loops will have i
and item
in scope.get_step_result(step_id: str)
get_start_data()