DynamicFlowExecutor

Struct DynamicFlowExecutor 

Source
pub struct DynamicFlowExecutor { /* private fields */ }
Expand description

统一的动态流程执行器

Implementations§

Source§

impl DynamicFlowExecutor

Source

pub fn new(config: WorkflowConfig) -> Result<Self>

创建新的动态流程执行器

Source

pub fn with_executor_config( config: WorkflowConfig, executor_config: ExecutorConfig, ) -> Result<Self>

使用自定义执行器配置创建

Source

pub async fn execute( &mut self, context: SharedContext, ) -> Result<ExecutionResult>

执行工作流 - 新的分层架构实现

Source

pub fn get_execution_plan_preview(&self) -> Result<ExecutionPlan>

获取执行计划预览(不执行)

Source

pub fn analyze_workflow_complexity(&self) -> Result<ExecutionComplexity>

分析工作流复杂度

Source

pub fn validate_workflow(&self) -> Result<()>

验证工作流配置

Source

pub fn get_stats(&self) -> &ExecutionStats

获取执行统计信息

Source

pub fn get_workflow_info(&self) -> WorkflowInfo

获取工作流信息

Source

pub fn evaluator(&self) -> &ExpressionEvaluator

获取表达式评估器

Source

pub fn config(&self) -> &WorkflowConfig

获取工作流配置

Source

pub fn executor_status(&self) -> ExecutorStatus

获取执行器状态

Source

pub async fn stop(&mut self) -> Result<()>

停止执行器

Trait Implementations§

Source§

impl Executor for DynamicFlowExecutor

Source§

type Input = Arc<Mutex<FlowContext>>

Source§

type Output = ExecutionResult

Source§

type Error = Error

Source§

async fn execute( &mut self, input: Self::Input, ) -> Result<Self::Output, Self::Error>

执行输入并返回结果
Source§

fn status(&self) -> ExecutorStatus

获取执行器状态
Source§

async fn stop(&mut self) -> Result<(), Self::Error>

停止执行器

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.