pub struct Workflow { /* private fields */ }Implementations§
Source§impl Workflow
impl Workflow
Sourcepub fn build(name: &str) -> WorkflowBuilder
pub fn build(name: &str) -> WorkflowBuilder
Create a new unregistered Workflow with no activities. Returns a WorkflowBuilder that can be used to configure and register the new Workflow.
To get a copy of an existing registered Workflow use Workflow::clone_to.
Sourcepub fn clone_to(&self, name: &str) -> WorkflowBuilder
pub fn clone_to(&self, name: &str) -> WorkflowBuilder
Make a new unregistered Workflow, copying all activities and the execution strategy. Returns a WorkflowBuilder that can be used to configure and register the new Workflow.
name- the name for the new Workflow
Sourcepub fn clone_to_with_root(
&self,
name: &str,
root_activity: &str,
) -> WorkflowBuilder
pub fn clone_to_with_root( &self, name: &str, root_activity: &str, ) -> WorkflowBuilder
Sourcepub fn cloned(name: &str) -> Option<WorkflowBuilder>
pub fn cloned(name: &str) -> Option<WorkflowBuilder>
Clone the existing Workflow named name.
Returns a WorkflowBuilder that can be used to configure and register the new Workflow.
pub fn name(&self) -> String
Sourcepub fn contains(&self, activity: &str) -> bool
pub fn contains(&self, activity: &str) -> bool
Determine if an Activity exists in this Workflow.
Sourcepub fn configuration(&self) -> String
pub fn configuration(&self) -> String
Retrieve the configuration as an adjacency list in JSON for the Workflow.
Sourcepub fn configuration_with_activity(&self, activity: &str) -> String
pub fn configuration_with_activity(&self, activity: &str) -> String
Retrieve the configuration as an adjacency list in JSON for the
Workflow, just for the given activity.
activity - return the configuration for the activity
Sourcepub fn registered(&self) -> bool
pub fn registered(&self) -> bool
pub fn size(&self) -> usize
Sourcepub fn activity(&self, name: &str) -> Option<Ref<Activity>>
pub fn activity(&self, name: &str) -> Option<Ref<Activity>>
Retrieve the Activity object for the specified name.
Sourcepub fn activity_roots(&self, activity: &str) -> Array<BnString>
pub fn activity_roots(&self, activity: &str) -> Array<BnString>
Retrieve the list of activity roots for the Workflow, or if
specified just for the given activity.
activity- if specified, return the roots for theactivity
Sourcepub fn subactivities(&self, activity: &str, immediate: bool) -> Array<BnString>
pub fn subactivities(&self, activity: &str, immediate: bool) -> Array<BnString>
Retrieve the list of all activities, or optionally a filtered list.
activity- if specified, return the direct children and optionally the descendants of theactivity(includesactivity)immediate- whether to include only direct children ofactivityor all descendants
Sourcepub fn graph(
&self,
activity: &str,
sequential: Option<bool>,
) -> Option<Ref<FlowGraph>>
pub fn graph( &self, activity: &str, sequential: Option<bool>, ) -> Option<Ref<FlowGraph>>
Generate a FlowGraph object for the current Workflow and optionally show it in the UI.
activity- if specified, generate the Flowgraph usingactivityas the rootsequential- whether to generate a Composite or Sequential style graph
Sourcepub fn show_metrics(&self)
pub fn show_metrics(&self)
Not yet implemented.
Sourcepub fn show_topology(&self)
pub fn show_topology(&self)
Show the Workflow topology in the UI.
Sourcepub fn show_trace(&self)
pub fn show_trace(&self)
Not yet implemented.
Trait Implementations§
Source§impl CoreArrayProvider for Workflow
impl CoreArrayProvider for Workflow
Auto Trait Implementations§
impl Freeze for Workflow
impl RefUnwindSafe for Workflow
impl !Send for Workflow
impl !Sync for Workflow
impl Unpin for Workflow
impl UnwindSafe for Workflow
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more