Skip to main content

WorkflowGraph

Trait WorkflowGraph 

Source
pub trait WorkflowGraph {
    // Required methods
    fn can_transition(&self, current_phase: &str, target_phase: &str) -> bool;
    fn get_phase(&self, phase_id: &str) -> Option<&Phase>;
    fn get_start_phase(&self) -> Option<&Phase>;
}
Expand description

Trait for querying workflow capability.

Required Methods§

Source

fn can_transition(&self, current_phase: &str, target_phase: &str) -> bool

Returns true if a transition exists from current_phase to target_phase.

Source

fn get_phase(&self, phase_id: &str) -> Option<&Phase>

Returns the Phase definition for a given ID.

Source

fn get_start_phase(&self) -> Option<&Phase>

Returns the starting phase of the workflow.

Implementors§