pub struct ActivityType {
pub activity_id: String,
pub name: String,
pub business_process: BusinessProcess,
pub involved_object_types: Vec<String>,
pub state_transitions: Vec<ActivityStateTransition>,
pub allowed_resource_types: Vec<String>,
pub typical_duration_minutes: Option<f64>,
pub duration_std_dev: Option<f64>,
pub is_automated: bool,
pub creates_object: bool,
pub completes_object: bool,
}Expand description
Definition of a business activity in OCPM.
Fields§
§activity_id: StringUnique activity type ID
name: StringHuman-readable name (e.g., “Create Order”, “Post Invoice”)
business_process: BusinessProcessBusiness process this activity belongs to
involved_object_types: Vec<String>Object types this activity operates on
state_transitions: Vec<ActivityStateTransition>Lifecycle transitions this activity triggers
allowed_resource_types: Vec<String>Resource types that can perform this activity
typical_duration_minutes: Option<f64>Typical duration in minutes (for simulation)
duration_std_dev: Option<f64>Standard deviation of duration
is_automated: boolIs this a manual or automated activity
creates_object: boolDoes this activity create a new object
completes_object: boolDoes this activity complete/terminate an object
Implementations§
Source§impl ActivityType
impl ActivityType
Sourcepub fn new(
activity_id: &str,
name: &str,
business_process: BusinessProcess,
) -> Self
pub fn new( activity_id: &str, name: &str, business_process: BusinessProcess, ) -> Self
Create a new activity type.
Sourcepub fn with_object_types(self, types: Vec<&str>) -> Self
pub fn with_object_types(self, types: Vec<&str>) -> Self
Add involved object types.
Sourcepub fn with_transitions(self, transitions: Vec<ActivityStateTransition>) -> Self
pub fn with_transitions(self, transitions: Vec<ActivityStateTransition>) -> Self
Add state transitions.
Sourcepub fn with_duration(self, minutes: f64, std_dev: f64) -> Self
pub fn with_duration(self, minutes: f64, std_dev: f64) -> Self
Set typical duration.
Sourcepub fn approve_po() -> Self
pub fn approve_po() -> Self
Approve Purchase Order activity.
Sourcepub fn release_po() -> Self
pub fn release_po() -> Self
Release Purchase Order activity.
Sourcepub fn receive_invoice() -> Self
pub fn receive_invoice() -> Self
Receive Invoice activity.
Sourcepub fn verify_invoice() -> Self
pub fn verify_invoice() -> Self
Verify Invoice (three-way match) activity.
Sourcepub fn post_invoice() -> Self
pub fn post_invoice() -> Self
Post Invoice activity.
Sourcepub fn execute_payment() -> Self
pub fn execute_payment() -> Self
Execute Payment activity.
Sourcepub fn check_credit() -> Self
pub fn check_credit() -> Self
Check Credit activity.
Sourcepub fn release_so() -> Self
pub fn release_so() -> Self
Release Sales Order activity.
Sourcepub fn create_delivery() -> Self
pub fn create_delivery() -> Self
Create Delivery activity.
Sourcepub fn create_customer_invoice() -> Self
pub fn create_customer_invoice() -> Self
Create Customer Invoice activity.
Sourcepub fn post_customer_invoice() -> Self
pub fn post_customer_invoice() -> Self
Post Customer Invoice activity.
Sourcepub fn receive_payment() -> Self
pub fn receive_payment() -> Self
Receive Payment activity.
Sourcepub fn p2p_activities() -> Vec<Self>
pub fn p2p_activities() -> Vec<Self>
Get all standard P2P activities.
Sourcepub fn o2c_activities() -> Vec<Self>
pub fn o2c_activities() -> Vec<Self>
Get all standard O2C activities.
Trait Implementations§
Source§impl Clone for ActivityType
impl Clone for ActivityType
Source§fn clone(&self) -> ActivityType
fn clone(&self) -> ActivityType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more