Skip to main content

execute_continuation_sync

Function execute_continuation_sync 

Source
pub fn execute_continuation_sync<F>(
    continuation: &WorkflowContinuation,
    input: Bytes,
    execute_task: &F,
) -> Result<Bytes, RuntimeError>
where F: Fn(&str, Bytes) -> Result<Bytes, BoxError>,
Expand description

Execute a workflow continuation synchronously.

This is useful for environments that don’t support async (like Python with GIL). Branches are executed sequentially.

§Arguments

  • continuation - The workflow continuation to execute
  • input - Input bytes for the first task
  • execute_task - Callback to execute a task: (task_id, input) -> Result<output>

§Errors

Returns an error if task execution fails.