Trait FlowInstanceManager

Source
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§

Source

fn has(&self, id: Uuid) -> bool

Returns true, if an flow instance exists with the given UUID.

Source

fn get(&self, id: Uuid) -> Option<ReactiveFlow>

Returns the flow instance with the given UUID or None.

Source

fn get_by_label(&self, label: &str) -> Option<ReactiveFlow>

Returns the flow instance with the given label or None.

Source

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.

Source

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.

Source

fn delete(&self, id: Uuid) -> bool

Deletes the flow instance with the given id.

Implementors§