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 ofactivity
or 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 usingactivity
as 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.