mistral.db.v2.sqlalchemy package

Submodules

mistral.db.v2.sqlalchemy.api module

mistral.db.v2.sqlalchemy.filters module

mistral.db.v2.sqlalchemy.models module

class mistral.db.v2.sqlalchemy.models.ActionDefinition(**kwargs)

Bases: mistral.db.v2.sqlalchemy.models.Definition

Contains info about registered Actions.

class mistral.db.v2.sqlalchemy.models.ActionExecution(**kwargs)

Bases: mistral.db.v2.sqlalchemy.models.Execution

Contains action execution information.

class mistral.db.v2.sqlalchemy.models.CronTrigger(**kwargs)

Bases: mistral.db.sqlalchemy.model_base.MistralSecureModelBase

Contains info about cron triggers.

to_dict()
class mistral.db.v2.sqlalchemy.models.Definition(**kwargs)

Bases: mistral.db.sqlalchemy.model_base.MistralSecureModelBase

class mistral.db.v2.sqlalchemy.models.DelayedCall(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Contains info about delayed calls.

class mistral.db.v2.sqlalchemy.models.Environment(**kwargs)

Bases: mistral.db.sqlalchemy.model_base.MistralSecureModelBase

Contains environment variables for workflow execution.

class mistral.db.v2.sqlalchemy.models.EventTrigger(**kwargs)

Bases: mistral.db.sqlalchemy.model_base.MistralSecureModelBase

Contains info about event triggers.

class mistral.db.v2.sqlalchemy.models.Execution(**kwargs)

Bases: mistral.db.sqlalchemy.model_base.MistralSecureModelBase

class mistral.db.v2.sqlalchemy.models.NamedLock(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Contains info about named locks.

Usage of named locks is based on properties of READ COMMITTED transactions of the most generally used SQL databases such as Postgres, MySQL, Oracle etc.

The locking scenario is as follows: 1. Transaction A (TX-A) inserts a row with unique ‘id’ and

some value that identifies a locked object stored in ‘name’.
  1. Transaction B (TX-B) and any subsequent transactions tries

    to insert a row with unique ‘id’ and the same value of ‘name’ field and it waits till TX-A is completed due to transactional properties of READ COMMITTED.

  2. If TX-A then immediately deletes the record and commits then

    TX-B and or one of the subsequent transactions are released and its ‘insert’ is completed.

  3. Then the scenario repeats with step #2 where the role of TX-A

    will be playing a transaction that just did insert.

Practically, this table should never contain any committed rows. All its usage is around the play with transactional storages.

class mistral.db.v2.sqlalchemy.models.ResourceMember(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Contains info about resource members.

class mistral.db.v2.sqlalchemy.models.TaskExecution(**kwargs)

Bases: mistral.db.v2.sqlalchemy.models.Execution

Contains task runtime information.

class mistral.db.v2.sqlalchemy.models.Workbook(**kwargs)

Bases: mistral.db.v2.sqlalchemy.models.Definition

Contains info about workbook (including definition in Mistral DSL).

class mistral.db.v2.sqlalchemy.models.WorkflowDefinition(**kwargs)

Bases: mistral.db.v2.sqlalchemy.models.Definition

Contains info about workflow (including definition in Mistral DSL).

class mistral.db.v2.sqlalchemy.models.WorkflowExecution(**kwargs)

Bases: mistral.db.v2.sqlalchemy.models.Execution

Contains workflow execution information.

mistral.db.v2.sqlalchemy.models.cls

alias of TaskExecution

Module contents