pub struct ExecutionContext {
pub process_definition: ProcessDefinition,
pub instance_id: String,
pub current_elements: Vec<String>,
pub variables: HashMap<String, Value>,
pub execution_history: Vec<ExecutionStep>,
pub state: ProcessInstanceState,
}Expand description
Execution Context
Context for executing a BPMN process instance. Contains process state, variables, and execution information.
Fields§
§process_definition: ProcessDefinitionProcess definition
instance_id: StringProcess instance ID
current_elements: Vec<String>Current element IDs being executed
variables: HashMap<String, Value>Process variables
execution_history: Vec<ExecutionStep>Execution history
state: ProcessInstanceStateProcess state
Implementations§
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn new(process_definition: ProcessDefinition, instance_id: String) -> Self
pub fn new(process_definition: ProcessDefinition, instance_id: String) -> Self
Create a new execution context
Sourcepub fn set_variable(&mut self, name: String, value: Value)
pub fn set_variable(&mut self, name: String, value: Value)
Set a variable
Sourcepub fn get_variable(&self, name: &str) -> Option<&Value>
pub fn get_variable(&self, name: &str) -> Option<&Value>
Get a variable
Sourcepub fn add_execution_step(&mut self, step: ExecutionStep)
pub fn add_execution_step(&mut self, step: ExecutionStep)
Add execution step to history
Sourcepub fn set_current_elements(&mut self, element_ids: Vec<String>)
pub fn set_current_elements(&mut self, element_ids: Vec<String>)
Set current elements
Sourcepub fn clear_current_elements(&mut self)
pub fn clear_current_elements(&mut self)
Clear current elements
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§fn clone(&self) -> ExecutionContext
fn clone(&self) -> ExecutionContext
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 moreAuto Trait Implementations§
impl Freeze for ExecutionContext
impl RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnsafeUnpin for ExecutionContext
impl UnwindSafe for ExecutionContext
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