pub struct WorkflowExecutionState {
pub run_task_id: String,
pub agent_id: String,
pub thread_id: String,
pub user_id: String,
pub workspace_id: Option<String>,
pub definition: WorkflowDefinition,
pub entry_point: Option<String>,
pub input: Value,
pub context: Value,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Run-level state for one workflow execution. Keyed by run_task_id
(the run’s root Task id).
thread_id / user_id / workspace_id are snapshotted at run
start so resume re-builds an ExecutorContext without any task
store lookup (which would itself need tenant context — a chicken
and egg).
Fields§
§run_task_id: String§agent_id: String§thread_id: String§user_id: String§workspace_id: Option<String>§definition: WorkflowDefinitionWorkflow definition snapshotted at run start. Later edits to the agent config cannot corrupt an in-flight run.
entry_point: Option<String>§input: Value§context: ValueShared bag steps accumulate results into — read at template
resolution time as {steps.X}, {input.Y}, {env.Z}.
created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl WorkflowExecutionState
impl WorkflowExecutionState
pub fn new( run_task_id: impl Into<String>, agent_id: impl Into<String>, thread_id: impl Into<String>, user_id: impl Into<String>, definition: WorkflowDefinition, ) -> Self
pub fn with_workspace_id(self, workspace_id: Option<String>) -> Self
pub fn with_entry_point(self, entry_point: Option<String>) -> Self
pub fn with_input(self, input: Value) -> Self
pub fn with_context(self, context: Value) -> Self
Trait Implementations§
Source§impl Clone for WorkflowExecutionState
impl Clone for WorkflowExecutionState
Source§fn clone(&self) -> WorkflowExecutionState
fn clone(&self) -> WorkflowExecutionState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkflowExecutionState
impl Debug for WorkflowExecutionState
Source§impl<'de> Deserialize<'de> for WorkflowExecutionState
impl<'de> Deserialize<'de> for WorkflowExecutionState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WorkflowExecutionState
impl RefUnwindSafe for WorkflowExecutionState
impl Send for WorkflowExecutionState
impl Sync for WorkflowExecutionState
impl Unpin for WorkflowExecutionState
impl UnsafeUnpin for WorkflowExecutionState
impl UnwindSafe for WorkflowExecutionState
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