pub trait ReactiveFlowManager:
Send
+ Sync
+ Lifecycle {
Show 13 methods
// 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 get_all(&self) -> Vec<ReactiveFlow>;
fn get_by_type(&self, ty: &FlowTypeId) -> Vec<ReactiveFlow>;
fn count_flow_instances(&self) -> usize;
fn create_reactive_flow(
&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 register_flow_instance_and_reactive_instances(
&self,
reactive_flow_instance: ReactiveFlow,
);
fn register_flow_instance(&self, reactive_flow_instance: ReactiveFlow);
fn delete(&self, id: Uuid) -> bool;
fn register_provider(
&self,
id: Uuid,
flow_instance_provider: Arc<dyn FlowInstanceProvider>,
);
fn unregister_provider(&self, id: &Uuid);
}
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 that matches the given label or None.
Sourcefn get_by_type(&self, ty: &FlowTypeId) -> Vec<ReactiveFlow>
fn get_by_type(&self, ty: &FlowTypeId) -> Vec<ReactiveFlow>
Returns all reactive entity instances of the given type.
Sourcefn count_flow_instances(&self) -> usize
fn count_flow_instances(&self) -> usize
Returns the count of registered reactive flow instances.
Sourcefn create_reactive_flow(
&self,
flow_instance: FlowInstance,
) -> Result<ReactiveFlow, ReactiveFlowCreationError>
fn create_reactive_flow( &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.
The wrapper entity instance will be created as well as entity and relation instances.
The properties are assigned to the wrapper entity instance.
The variables will replace the property value.
All reactive instances will be registered in the ReactiveEntityManager and the ReactiveRelationManager.
Sourcefn register_flow_instance_and_reactive_instances(
&self,
reactive_flow_instance: ReactiveFlow,
)
fn register_flow_instance_and_reactive_instances( &self, reactive_flow_instance: ReactiveFlow, )
Registers the given reactive flow instance and registers all of the reactive instances contained in the given reactive flow instance.
Sourcefn register_flow_instance(&self, reactive_flow_instance: ReactiveFlow)
fn register_flow_instance(&self, reactive_flow_instance: ReactiveFlow)
Registers the given reactive flow instance. Does not register it’s reactive instances except the wrapper entity.
Sourcefn register_provider(
&self,
id: Uuid,
flow_instance_provider: Arc<dyn FlowInstanceProvider>,
)
fn register_provider( &self, id: Uuid, flow_instance_provider: Arc<dyn FlowInstanceProvider>, )
Registers a flow instance provider.
Sourcefn unregister_provider(&self, id: &Uuid)
fn unregister_provider(&self, id: &Uuid)
Unregisters a flow instance provider.