Expand description
The tables a workflow engine keeps, as SQL.
The schema generator writes the same statements into a module’s migration; this function is the framework’s own copy, for tests and for a service that creates the tables itself.
Constants§
- STATUSES
- The statuses an instance moves through.
Functions§
- drop_
and_ create_ policies - The statements that replace both policies, for a test that creates the tables more than once.
- migration_
sql - The statements that create
bb_workflow_instancesandbb_workflow_stepsinschema, fence them bycompany_idwith row-level security. The outbox and inbox tables the engine stages events in and dedups resumes with arebackbone_core::write_hooks::migrate_outbox‘s (a module that stages events runs it already). Run it as the table owner. Not idempotent for the policies’ sake: run it once, as a migration does;drop_and_create_policiesis for a test that re-creates them. - org_
fence_ sql - The statements that fence both tables by org unit instead of by company (ADR-0029), for a module
whose tables are org-scoped: the
<table>_org_unit_isolationpolicy (the entitlement union, plus the read-only sweep clause) replaces the company policy, and a trigger fills a NULLorg_unit_idfrom the acting unit. A row with no org unit is then refused loudly. The generated migration adds the kind guard overorganization.org_unitsto this. - valid_
schema - Whether
schemais a plain lowercase identifier, safe to put in a statement.