flask_bpmn.models.db#

Db.

Module Contents#

Classes#

SpiffworkflowBaseDBModel

SpiffworkflowBaseDBModel.

Functions#

update_created_modified_on_create_listener(→ None)

Event listener that runs before a record is updated, and sets the create/modified field accordingly.

update_modified_on_update_listener(→ None)

Event listener that runs before a record is updated, and sets the modified field accordingly.

add_listeners(→ None)

Adds the listeners to all subclasses.

Attributes#

flask_bpmn.models.db.db#
flask_bpmn.models.db.migrate#
class flask_bpmn.models.db.SpiffworkflowBaseDBModel#

Bases: db

SpiffworkflowBaseDBModel.

__abstract__ = True#
classmethod _all_subclasses() list[type[SpiffworkflowBaseDBModel]]#

Get all subclasses of cls, descending.

So, if A is a subclass of B is a subclass of cls, this will include A and B. (Does not include cls)

validate_enum_field(key: str, value: Any, enum_variable: enum.EnumMeta) Any#

Validate_enum_field.

flask_bpmn.models.db.update_created_modified_on_create_listener(mapper: sqlalchemy.orm.mapper.Mapper, _connection: sqlalchemy.engine.base.Connection, target: SpiffworkflowBaseDBModel) None#

Event listener that runs before a record is updated, and sets the create/modified field accordingly.

flask_bpmn.models.db.update_modified_on_update_listener(mapper: sqlalchemy.orm.mapper.Mapper, _connection: sqlalchemy.engine.base.Connection, target: SpiffworkflowBaseDBModel) None#

Event listener that runs before a record is updated, and sets the modified field accordingly.

flask_bpmn.models.db.add_listeners() None#

Adds the listeners to all subclasses.

This should be called after importing all subclasses