pub trait FlowInstanceManager: Send + Sync {
// Required methods
fn has(&self, id: Uuid) -> bool;
fn get(&self, id: Uuid) -> Option<ReactiveFlow>;
fn get_by_label(&self, label: &str) -> Option<ReactiveFlow>;
fn create(
&self,
flow_instance: FlowInstance,
) -> Result<ReactiveFlow, ReactiveFlowCreationError>;
fn create_from_type(
&self,
ty: &FlowTypeId,
id: Option<Uuid>,
variables: PropertyInstances,
properties: PropertyInstances,
) -> Result<ReactiveFlow, ReactiveFlowCreationError>;
fn delete(&self, id: Uuid) -> bool;
}
Required Methods§
Sourcefn get(&self, id: Uuid) -> Option<ReactiveFlow>
fn get(&self, id: Uuid) -> Option<ReactiveFlow>
Returns the flow instance with the given UUID or None.
Sourcefn get_by_label(&self, label: &str) -> Option<ReactiveFlow>
fn get_by_label(&self, label: &str) -> Option<ReactiveFlow>
Returns the flow instance with the given label or None.
Sourcefn create(
&self,
flow_instance: FlowInstance,
) -> Result<ReactiveFlow, ReactiveFlowCreationError>
fn create( &self, flow_instance: FlowInstance, ) -> Result<ReactiveFlow, ReactiveFlowCreationError>
Creates a new reactive flow instance from the given flow instance descriptor.
The wrapper entity instance will be created as well as entity and relation instances.
All reactive instances will be registered in the ReactiveEntityManager and the ReactiveRelationManager.
Sourcefn create_from_type(
&self,
ty: &FlowTypeId,
id: Option<Uuid>,
variables: PropertyInstances,
properties: PropertyInstances,
) -> Result<ReactiveFlow, ReactiveFlowCreationError>
fn create_from_type( &self, ty: &FlowTypeId, id: Option<Uuid>, variables: PropertyInstances, properties: PropertyInstances, ) -> Result<ReactiveFlow, ReactiveFlowCreationError>
Create a new reactive flow instance from the flow type by the given name.
It’s possible to individualize the flow instance with templating using the given variables.
The wrapper entity instance will be created as well as entity and relation instances.
All reactive instances will be registered in the ReactiveEntityManager and the ReactiveRelationManager.