pub struct ProcessInstance {
pub id: String,
pub definition: Arc<ProcessDefinition>,
pub context: Arc<RwLock<ExecutionContext>>,
}Expand description
Process Instance
Represents a running instance of a BPMN process.
Fields§
§id: StringInstance ID
definition: Arc<ProcessDefinition>Process definition
context: Arc<RwLock<ExecutionContext>>Execution context
Implementations§
Source§impl ProcessInstance
impl ProcessInstance
Sourcepub fn new(definition: Arc<ProcessDefinition>, instance_id: String) -> Self
pub fn new(definition: Arc<ProcessDefinition>, instance_id: String) -> Self
Create a new process instance
Sourcepub fn definition(&self) -> &Arc<ProcessDefinition>
pub fn definition(&self) -> &Arc<ProcessDefinition>
Get the process definition
Sourcepub async fn context(&self) -> RwLockReadGuard<'_, ExecutionContext>
pub async fn context(&self) -> RwLockReadGuard<'_, ExecutionContext>
Get a read lock on the execution context
Sourcepub async fn context_mut(&self) -> RwLockWriteGuard<'_, ExecutionContext>
pub async fn context_mut(&self) -> RwLockWriteGuard<'_, ExecutionContext>
Get a write lock on the execution context
Trait Implementations§
Source§impl Clone for ProcessInstance
impl Clone for ProcessInstance
Source§fn clone(&self) -> ProcessInstance
fn clone(&self) -> ProcessInstance
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 !RefUnwindSafe for ProcessInstance
impl !UnwindSafe for ProcessInstance
impl Freeze for ProcessInstance
impl Send for ProcessInstance
impl Sync for ProcessInstance
impl Unpin for ProcessInstance
impl UnsafeUnpin for ProcessInstance
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