pub struct ProcessVariant {Show 14 fields
pub variant_id: String,
pub business_process: BusinessProcess,
pub activity_sequence: Vec<String>,
pub frequency: u64,
pub frequency_percent: f64,
pub avg_duration_hours: f64,
pub min_duration_hours: f64,
pub max_duration_hours: f64,
pub std_duration_hours: f64,
pub example_case_ids: Vec<Uuid>,
pub is_happy_path: bool,
pub has_rework: bool,
pub has_skipped_steps: bool,
pub has_out_of_order: bool,
}Expand description
A distinct execution sequence through the process.
Fields§
§variant_id: StringUnique variant ID
business_process: BusinessProcessBusiness process
activity_sequence: Vec<String>Sequence of activity IDs in this variant
frequency: u64Frequency count (how many times this variant occurred)
frequency_percent: f64Percentage of total cases
avg_duration_hours: f64Average duration for this variant (in hours)
min_duration_hours: f64Minimum duration observed
max_duration_hours: f64Maximum duration observed
std_duration_hours: f64Standard deviation of duration
example_case_ids: Vec<Uuid>Example case IDs following this variant
is_happy_path: boolIs this a happy path (expected) variant
has_rework: boolDeviation indicators
has_skipped_steps: boolHas skipped steps
has_out_of_order: boolHas out-of-order steps
Implementations§
Source§impl ProcessVariant
impl ProcessVariant
Sourcepub fn new(variant_id: &str, business_process: BusinessProcess) -> Self
pub fn new(variant_id: &str, business_process: BusinessProcess) -> Self
Create a new process variant.
Sourcepub fn with_sequence(self, sequence: Vec<&str>) -> Self
pub fn with_sequence(self, sequence: Vec<&str>) -> Self
Set the activity sequence.
Sourcepub fn happy_path(self) -> Self
pub fn happy_path(self) -> Self
Mark as happy path.
Sourcepub fn with_rework(self) -> Self
pub fn with_rework(self) -> Self
Mark as having rework.
Sourcepub fn with_skipped_steps(self) -> Self
pub fn with_skipped_steps(self) -> Self
Mark as having skipped steps.
Sourcepub fn add_case(&mut self, case_id: Uuid, duration_hours: f64)
pub fn add_case(&mut self, case_id: Uuid, duration_hours: f64)
Increment frequency and add example case.
Sourcepub fn sequence_hash(&self) -> String
pub fn sequence_hash(&self) -> String
Generate a hash-based variant ID from the sequence.
Sourcepub fn p2p_happy_path() -> Self
pub fn p2p_happy_path() -> Self
Standard P2P happy path variant.
Sourcepub fn o2c_happy_path() -> Self
pub fn o2c_happy_path() -> Self
Standard O2C happy path variant.
Trait Implementations§
Source§impl Clone for ProcessVariant
impl Clone for ProcessVariant
Source§fn clone(&self) -> ProcessVariant
fn clone(&self) -> ProcessVariant
Returns a duplicate of the value. Read more
1.0.0 · 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 ProcessVariant
impl Debug for ProcessVariant
Source§impl<'de> Deserialize<'de> for ProcessVariant
impl<'de> Deserialize<'de> for ProcessVariant
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 ProcessVariant
impl RefUnwindSafe for ProcessVariant
impl Send for ProcessVariant
impl Sync for ProcessVariant
impl Unpin for ProcessVariant
impl UnwindSafe for ProcessVariant
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