pub struct WorkflowContext {
pub workflow: WorkflowDefinition,
pub role_registry: RoleRegistry,
pub progress_writer: Option<ProgressJournalWriter>,
pub health_watchdog: Option<RunHealthWatchdog>,
pub inputs: HashMap<String, Value>,
pub step_outputs: HashMap<String, ParsedOutput>,
}Expand description
Workflow execution context
Fields§
§workflow: WorkflowDefinitionWorkflow definition
role_registry: RoleRegistryRole registry
progress_writer: Option<ProgressJournalWriter>Progress journal writer
health_watchdog: Option<RunHealthWatchdog>Health watchdog
inputs: HashMap<String, Value>Input values
step_outputs: HashMap<String, ParsedOutput>Step outputs
Implementations§
Source§impl WorkflowContext
impl WorkflowContext
Sourcepub fn new(workflow: WorkflowDefinition, inputs: HashMap<String, Value>) -> Self
pub fn new(workflow: WorkflowDefinition, inputs: HashMap<String, Value>) -> Self
Create new workflow context
Sourcepub fn with_progress_journal(self, run_id: String, task: String) -> Self
pub fn with_progress_journal(self, run_id: String, task: String) -> Self
Enable progress journal
Sourcepub fn with_health_watchdog(self, config: HealthCheckConfig) -> Self
pub fn with_health_watchdog(self, config: HealthCheckConfig) -> Self
Enable health monitoring
Sourcepub fn get_step_output(&self, step_id: &str) -> Option<&ParsedOutput>
pub fn get_step_output(&self, step_id: &str) -> Option<&ParsedOutput>
Get step output
Sourcepub fn set_step_output(&mut self, step_id: String, output: ParsedOutput)
pub fn set_step_output(&mut self, step_id: String, output: ParsedOutput)
Set step output
Sourcepub fn substitute_variables(&self, template: &str) -> String
pub fn substitute_variables(&self, template: &str) -> String
Substitute variables in template
Auto Trait Implementations§
impl Freeze for WorkflowContext
impl RefUnwindSafe for WorkflowContext
impl Send for WorkflowContext
impl Sync for WorkflowContext
impl Unpin for WorkflowContext
impl UnsafeUnpin for WorkflowContext
impl UnwindSafe for WorkflowContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more