pub struct ProcessDefinition {
pub id: String,
pub name: Option<String>,
pub process_type: String,
pub is_executable: bool,
pub elements: HashMap<String, ProcessElement>,
pub flows: HashMap<String, SequenceFlow>,
pub variables: HashMap<String, Variable>,
}Expand description
Process Definition
Internal representation of a BPMN process definition.
Fields§
§id: StringProcess ID
name: Option<String>Process name
process_type: StringProcess type
is_executable: boolIs executable
elements: HashMap<String, ProcessElement>Process elements indexed by ID
flows: HashMap<String, SequenceFlow>Sequence flows indexed by ID
variables: HashMap<String, Variable>Variables
Implementations§
Source§impl ProcessDefinition
impl ProcessDefinition
Sourcepub fn from_xml(xml: &str) -> Result<Self, ParseError>
pub fn from_xml(xml: &str) -> Result<Self, ParseError>
Create a new process definition from XML
Sourcepub fn from_auto(input: &str) -> Result<(Self, BpmnFormat), ParseError>
pub fn from_auto(input: &str) -> Result<(Self, BpmnFormat), ParseError>
Create a new process definition with automatic format detection
Sourcepub fn to_json(&self) -> Result<String, SerializeError>
pub fn to_json(&self) -> Result<String, SerializeError>
Serialize to JSON
Sourcepub fn to_xml(&self) -> Result<String, SerializeError>
pub fn to_xml(&self) -> Result<String, SerializeError>
Serialize to XML
Sourcepub fn from_bpmn_json(json_process: BpmnJsonProcess) -> Result<Self, Error>
pub fn from_bpmn_json(json_process: BpmnJsonProcess) -> Result<Self, Error>
Create from BPMn JSON structure
Sourcepub fn get_element(&self, id: &str) -> Option<&ProcessElement>
pub fn get_element(&self, id: &str) -> Option<&ProcessElement>
Get element by ID
Sourcepub fn get_flow(&self, id: &str) -> Option<&SequenceFlow>
pub fn get_flow(&self, id: &str) -> Option<&SequenceFlow>
Get sequence flow by ID
Sourcepub fn get_outgoing_flows(&self, element_id: &str) -> Vec<&SequenceFlow>
pub fn get_outgoing_flows(&self, element_id: &str) -> Vec<&SequenceFlow>
Get outgoing flows from an element
Sourcepub fn get_incoming_flows(&self, element_id: &str) -> Vec<&SequenceFlow>
pub fn get_incoming_flows(&self, element_id: &str) -> Vec<&SequenceFlow>
Get incoming flows to an element
Trait Implementations§
Source§impl Clone for ProcessDefinition
impl Clone for ProcessDefinition
Source§fn clone(&self) -> ProcessDefinition
fn clone(&self) -> ProcessDefinition
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 ProcessDefinition
impl RefUnwindSafe for ProcessDefinition
impl Send for ProcessDefinition
impl Sync for ProcessDefinition
impl Unpin for ProcessDefinition
impl UnsafeUnpin for ProcessDefinition
impl UnwindSafe for ProcessDefinition
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