precommit
This commit is contained in:
parent
6cdd630605
commit
cf09b2258b
|
@ -2,7 +2,6 @@
|
|||
import csv
|
||||
|
||||
from flask_bpmn.models.db import db
|
||||
|
||||
from spiffworkflow_backend import get_hacked_up_app_for_script
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import time
|
||||
|
||||
from apscheduler.schedulers.background import BlockingScheduler # type: ignore
|
||||
|
||||
from spiffworkflow_backend import create_app
|
||||
from spiffworkflow_backend import start_scheduler
|
||||
from spiffworkflow_backend.helpers.db_helper import try_to_connect
|
||||
|
|
|
@ -7,8 +7,6 @@ from flask.app import Flask
|
|||
from flask.testing import FlaskClient
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.models.active_task_user import ActiveTaskUserModel
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
|
@ -19,6 +17,7 @@ from spiffworkflow_backend.services.process_instance_service import (
|
|||
ProcessInstanceService,
|
||||
)
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
# from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import logging
|
||||
from logging.config import fileConfig
|
||||
|
||||
from flask import current_app
|
||||
|
||||
from alembic import context
|
||||
from flask import current_app
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
# access to the values within the .ini file in use.
|
||||
|
@ -12,17 +11,17 @@ config = context.config
|
|||
# Interpret the config file for Python logging.
|
||||
# This line sets up loggers basically.
|
||||
fileConfig(config.config_file_name)
|
||||
logger = logging.getLogger('alembic.env')
|
||||
logger = logging.getLogger("alembic.env")
|
||||
|
||||
# add your model's MetaData object here
|
||||
# for 'autogenerate' support
|
||||
# from myapp import mymodel
|
||||
# target_metadata = mymodel.Base.metadata
|
||||
config.set_main_option(
|
||||
'sqlalchemy.url',
|
||||
str(current_app.extensions['migrate'].db.get_engine().url).replace(
|
||||
'%', '%%'))
|
||||
target_metadata = current_app.extensions['migrate'].db.metadata
|
||||
"sqlalchemy.url",
|
||||
str(current_app.extensions["migrate"].db.get_engine().url).replace("%", "%%"),
|
||||
)
|
||||
target_metadata = current_app.extensions["migrate"].db.metadata
|
||||
|
||||
# other values from the config, defined by the needs of env.py,
|
||||
# can be acquired:
|
||||
|
@ -43,9 +42,7 @@ def run_migrations_offline():
|
|||
|
||||
"""
|
||||
url = config.get_main_option("sqlalchemy.url")
|
||||
context.configure(
|
||||
url=url, target_metadata=target_metadata, literal_binds=True
|
||||
)
|
||||
context.configure(url=url, target_metadata=target_metadata, literal_binds=True)
|
||||
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
@ -63,20 +60,20 @@ def run_migrations_online():
|
|||
# when there are no changes to the schema
|
||||
# reference: http://alembic.zzzcomputing.com/en/latest/cookbook.html
|
||||
def process_revision_directives(context, revision, directives):
|
||||
if getattr(config.cmd_opts, 'autogenerate', False):
|
||||
if getattr(config.cmd_opts, "autogenerate", False):
|
||||
script = directives[0]
|
||||
if script.upgrade_ops.is_empty():
|
||||
directives[:] = []
|
||||
logger.info('No changes in schema detected.')
|
||||
logger.info("No changes in schema detected.")
|
||||
|
||||
connectable = current_app.extensions['migrate'].db.get_engine()
|
||||
connectable = current_app.extensions["migrate"].db.get_engine()
|
||||
|
||||
with connectable.connect() as connection:
|
||||
context.configure(
|
||||
connection=connection,
|
||||
target_metadata=target_metadata,
|
||||
process_revision_directives=process_revision_directives,
|
||||
**current_app.extensions['migrate'].configure_args
|
||||
**current_app.extensions["migrate"].configure_args
|
||||
)
|
||||
|
||||
with context.begin_transaction():
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
"""empty message
|
||||
|
||||
Revision ID: b7790c9c8174
|
||||
Revises:
|
||||
Revises:
|
||||
Create Date: 2022-11-15 14:11:47.309399
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'b7790c9c8174'
|
||||
revision = "b7790c9c8174"
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
@ -18,305 +18,562 @@ depends_on = None
|
|||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('group',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('name', sa.String(length=255), nullable=True),
|
||||
sa.Column('identifier', sa.String(length=255), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
op.create_table(
|
||||
"group",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("name", sa.String(length=255), nullable=True),
|
||||
sa.Column("identifier", sa.String(length=255), nullable=True),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
op.create_table('message_model',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('identifier', sa.String(length=50), nullable=True),
|
||||
sa.Column('name', sa.String(length=50), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
op.create_table(
|
||||
"message_model",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("identifier", sa.String(length=50), nullable=True),
|
||||
sa.Column("name", sa.String(length=50), nullable=True),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
op.create_index(op.f('ix_message_model_identifier'), 'message_model', ['identifier'], unique=True)
|
||||
op.create_index(op.f('ix_message_model_name'), 'message_model', ['name'], unique=True)
|
||||
op.create_table('permission_target',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('uri', sa.String(length=255), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('uri')
|
||||
op.create_index(
|
||||
op.f("ix_message_model_identifier"),
|
||||
"message_model",
|
||||
["identifier"],
|
||||
unique=True,
|
||||
)
|
||||
op.create_table('spec_reference_cache',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('identifier', sa.String(length=255), nullable=True),
|
||||
sa.Column('display_name', sa.String(length=255), nullable=True),
|
||||
sa.Column('process_model_id', sa.String(length=255), nullable=True),
|
||||
sa.Column('type', sa.String(length=255), nullable=True),
|
||||
sa.Column('file_name', sa.String(length=255), nullable=True),
|
||||
sa.Column('relative_path', sa.String(length=255), nullable=True),
|
||||
sa.Column('has_lanes', sa.Boolean(), nullable=True),
|
||||
sa.Column('is_executable', sa.Boolean(), nullable=True),
|
||||
sa.Column('is_primary', sa.Boolean(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('identifier', 'type', name='_identifier_type_unique')
|
||||
op.create_index(
|
||||
op.f("ix_message_model_name"), "message_model", ["name"], unique=True
|
||||
)
|
||||
op.create_index(op.f('ix_spec_reference_cache_display_name'), 'spec_reference_cache', ['display_name'], unique=False)
|
||||
op.create_index(op.f('ix_spec_reference_cache_identifier'), 'spec_reference_cache', ['identifier'], unique=False)
|
||||
op.create_index(op.f('ix_spec_reference_cache_type'), 'spec_reference_cache', ['type'], unique=False)
|
||||
op.create_table('spiff_logging',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('process_instance_id', sa.Integer(), nullable=False),
|
||||
sa.Column('bpmn_process_identifier', sa.String(length=255), nullable=False),
|
||||
sa.Column('bpmn_task_identifier', sa.String(length=255), nullable=False),
|
||||
sa.Column('bpmn_task_name', sa.String(length=255), nullable=True),
|
||||
sa.Column('bpmn_task_type', sa.String(length=255), nullable=True),
|
||||
sa.Column('spiff_task_guid', sa.String(length=50), nullable=False),
|
||||
sa.Column('timestamp', sa.DECIMAL(precision=17, scale=6), nullable=False),
|
||||
sa.Column('message', sa.String(length=255), nullable=True),
|
||||
sa.Column('current_user_id', sa.Integer(), nullable=True),
|
||||
sa.Column('spiff_step', sa.Integer(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
op.create_table(
|
||||
"permission_target",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("uri", sa.String(length=255), nullable=False),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint("uri"),
|
||||
)
|
||||
op.create_table('user',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('username', sa.String(length=255), nullable=False),
|
||||
sa.Column('uid', sa.String(length=50), nullable=True),
|
||||
sa.Column('service', sa.String(length=50), nullable=False),
|
||||
sa.Column('service_id', sa.String(length=255), nullable=False),
|
||||
sa.Column('name', sa.String(length=255), nullable=True),
|
||||
sa.Column('email', sa.String(length=255), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('service', 'service_id', name='service_key'),
|
||||
sa.UniqueConstraint('uid'),
|
||||
sa.UniqueConstraint('username')
|
||||
op.create_table(
|
||||
"spec_reference_cache",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("identifier", sa.String(length=255), nullable=True),
|
||||
sa.Column("display_name", sa.String(length=255), nullable=True),
|
||||
sa.Column("process_model_id", sa.String(length=255), nullable=True),
|
||||
sa.Column("type", sa.String(length=255), nullable=True),
|
||||
sa.Column("file_name", sa.String(length=255), nullable=True),
|
||||
sa.Column("relative_path", sa.String(length=255), nullable=True),
|
||||
sa.Column("has_lanes", sa.Boolean(), nullable=True),
|
||||
sa.Column("is_executable", sa.Boolean(), nullable=True),
|
||||
sa.Column("is_primary", sa.Boolean(), nullable=True),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint("identifier", "type", name="_identifier_type_unique"),
|
||||
)
|
||||
op.create_table('message_correlation_property',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('identifier', sa.String(length=50), nullable=True),
|
||||
sa.Column('message_model_id', sa.Integer(), nullable=False),
|
||||
sa.Column('updated_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('created_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['message_model_id'], ['message_model.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('identifier', 'message_model_id', name='message_correlation_property_unique')
|
||||
op.create_index(
|
||||
op.f("ix_spec_reference_cache_display_name"),
|
||||
"spec_reference_cache",
|
||||
["display_name"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(op.f('ix_message_correlation_property_identifier'), 'message_correlation_property', ['identifier'], unique=False)
|
||||
op.create_table('message_triggerable_process_model',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('message_model_id', sa.Integer(), nullable=False),
|
||||
sa.Column('process_model_identifier', sa.String(length=50), nullable=False),
|
||||
sa.Column('process_group_identifier', sa.String(length=50), nullable=False),
|
||||
sa.Column('updated_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('created_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['message_model_id'], ['message_model.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('message_model_id')
|
||||
op.create_index(
|
||||
op.f("ix_spec_reference_cache_identifier"),
|
||||
"spec_reference_cache",
|
||||
["identifier"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(op.f('ix_message_triggerable_process_model_process_group_identifier'), 'message_triggerable_process_model', ['process_group_identifier'], unique=False)
|
||||
op.create_index(op.f('ix_message_triggerable_process_model_process_model_identifier'), 'message_triggerable_process_model', ['process_model_identifier'], unique=False)
|
||||
op.create_table('principal',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('user_id', sa.Integer(), nullable=True),
|
||||
sa.Column('group_id', sa.Integer(), nullable=True),
|
||||
sa.CheckConstraint('NOT(user_id IS NULL AND group_id IS NULL)'),
|
||||
sa.ForeignKeyConstraint(['group_id'], ['group.id'], ),
|
||||
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('group_id'),
|
||||
sa.UniqueConstraint('user_id')
|
||||
op.create_index(
|
||||
op.f("ix_spec_reference_cache_type"),
|
||||
"spec_reference_cache",
|
||||
["type"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table('process_instance',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('process_model_identifier', sa.String(length=255), nullable=False),
|
||||
sa.Column('process_group_identifier', sa.String(length=50), nullable=False),
|
||||
sa.Column('process_initiator_id', sa.Integer(), nullable=False),
|
||||
sa.Column('bpmn_json', sa.JSON(), nullable=True),
|
||||
sa.Column('start_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('end_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('updated_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('created_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('status', sa.String(length=50), nullable=True),
|
||||
sa.Column('bpmn_version_control_type', sa.String(length=50), nullable=True),
|
||||
sa.Column('bpmn_version_control_identifier', sa.String(length=255), nullable=True),
|
||||
sa.Column('spiff_step', sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['process_initiator_id'], ['user.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
op.create_table(
|
||||
"spiff_logging",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("process_instance_id", sa.Integer(), nullable=False),
|
||||
sa.Column("bpmn_process_identifier", sa.String(length=255), nullable=False),
|
||||
sa.Column("bpmn_task_identifier", sa.String(length=255), nullable=False),
|
||||
sa.Column("bpmn_task_name", sa.String(length=255), nullable=True),
|
||||
sa.Column("bpmn_task_type", sa.String(length=255), nullable=True),
|
||||
sa.Column("spiff_task_guid", sa.String(length=50), nullable=False),
|
||||
sa.Column("timestamp", sa.DECIMAL(precision=17, scale=6), nullable=False),
|
||||
sa.Column("message", sa.String(length=255), nullable=True),
|
||||
sa.Column("current_user_id", sa.Integer(), nullable=True),
|
||||
sa.Column("spiff_step", sa.Integer(), nullable=False),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
op.create_index(op.f('ix_process_instance_process_group_identifier'), 'process_instance', ['process_group_identifier'], unique=False)
|
||||
op.create_index(op.f('ix_process_instance_process_model_identifier'), 'process_instance', ['process_model_identifier'], unique=False)
|
||||
op.create_table('process_instance_report',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('identifier', sa.String(length=50), nullable=False),
|
||||
sa.Column('report_metadata', sa.JSON(), nullable=True),
|
||||
sa.Column('created_by_id', sa.Integer(), nullable=False),
|
||||
sa.Column('created_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('updated_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['created_by_id'], ['user.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('created_by_id', 'identifier', name='process_instance_report_unique')
|
||||
op.create_table(
|
||||
"user",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("username", sa.String(length=255), nullable=False),
|
||||
sa.Column("uid", sa.String(length=50), nullable=True),
|
||||
sa.Column("service", sa.String(length=50), nullable=False),
|
||||
sa.Column("service_id", sa.String(length=255), nullable=False),
|
||||
sa.Column("name", sa.String(length=255), nullable=True),
|
||||
sa.Column("email", sa.String(length=255), nullable=True),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint("service", "service_id", name="service_key"),
|
||||
sa.UniqueConstraint("uid"),
|
||||
sa.UniqueConstraint("username"),
|
||||
)
|
||||
op.create_index(op.f('ix_process_instance_report_created_by_id'), 'process_instance_report', ['created_by_id'], unique=False)
|
||||
op.create_index(op.f('ix_process_instance_report_identifier'), 'process_instance_report', ['identifier'], unique=False)
|
||||
op.create_table('refresh_token',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('user_id', sa.Integer(), nullable=False),
|
||||
sa.Column('token', sa.String(length=1024), nullable=False),
|
||||
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('user_id')
|
||||
op.create_table(
|
||||
"message_correlation_property",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("identifier", sa.String(length=50), nullable=True),
|
||||
sa.Column("message_model_id", sa.Integer(), nullable=False),
|
||||
sa.Column("updated_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("created_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["message_model_id"],
|
||||
["message_model.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint(
|
||||
"identifier", "message_model_id", name="message_correlation_property_unique"
|
||||
),
|
||||
)
|
||||
op.create_table('secret',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('key', sa.String(length=50), nullable=False),
|
||||
sa.Column('value', sa.Text(), nullable=False),
|
||||
sa.Column('user_id', sa.Integer(), nullable=False),
|
||||
sa.Column('updated_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('created_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('key')
|
||||
op.create_index(
|
||||
op.f("ix_message_correlation_property_identifier"),
|
||||
"message_correlation_property",
|
||||
["identifier"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table('spiff_step_details',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('process_instance_id', sa.Integer(), nullable=False),
|
||||
sa.Column('spiff_step', sa.Integer(), nullable=False),
|
||||
sa.Column('task_json', sa.JSON(), nullable=False),
|
||||
sa.Column('timestamp', sa.DECIMAL(precision=17, scale=6), nullable=False),
|
||||
sa.Column('completed_by_user_id', sa.Integer(), nullable=True),
|
||||
sa.Column('lane_assignment_id', sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['lane_assignment_id'], ['group.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
op.create_table(
|
||||
"message_triggerable_process_model",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("message_model_id", sa.Integer(), nullable=False),
|
||||
sa.Column("process_model_identifier", sa.String(length=50), nullable=False),
|
||||
sa.Column("process_group_identifier", sa.String(length=50), nullable=False),
|
||||
sa.Column("updated_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("created_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["message_model_id"],
|
||||
["message_model.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint("message_model_id"),
|
||||
)
|
||||
op.create_table('user_group_assignment',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('user_id', sa.Integer(), nullable=False),
|
||||
sa.Column('group_id', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['group_id'], ['group.id'], ),
|
||||
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('user_id', 'group_id', name='user_group_assignment_unique')
|
||||
op.create_index(
|
||||
op.f("ix_message_triggerable_process_model_process_group_identifier"),
|
||||
"message_triggerable_process_model",
|
||||
["process_group_identifier"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table('active_task',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('process_instance_id', sa.Integer(), nullable=False),
|
||||
sa.Column('actual_owner_id', sa.Integer(), nullable=True),
|
||||
sa.Column('lane_assignment_id', sa.Integer(), nullable=True),
|
||||
sa.Column('form_file_name', sa.String(length=50), nullable=True),
|
||||
sa.Column('ui_form_file_name', sa.String(length=50), nullable=True),
|
||||
sa.Column('updated_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('created_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('task_id', sa.String(length=50), nullable=True),
|
||||
sa.Column('task_name', sa.String(length=50), nullable=True),
|
||||
sa.Column('task_title', sa.String(length=50), nullable=True),
|
||||
sa.Column('task_type', sa.String(length=50), nullable=True),
|
||||
sa.Column('task_status', sa.String(length=50), nullable=True),
|
||||
sa.Column('process_model_display_name', sa.String(length=255), nullable=True),
|
||||
sa.ForeignKeyConstraint(['actual_owner_id'], ['user.id'], ),
|
||||
sa.ForeignKeyConstraint(['lane_assignment_id'], ['group.id'], ),
|
||||
sa.ForeignKeyConstraint(['process_instance_id'], ['process_instance.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('task_id', 'process_instance_id', name='active_task_unique')
|
||||
op.create_index(
|
||||
op.f("ix_message_triggerable_process_model_process_model_identifier"),
|
||||
"message_triggerable_process_model",
|
||||
["process_model_identifier"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table('message_correlation',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('process_instance_id', sa.Integer(), nullable=False),
|
||||
sa.Column('message_correlation_property_id', sa.Integer(), nullable=False),
|
||||
sa.Column('name', sa.String(length=255), nullable=False),
|
||||
sa.Column('value', sa.String(length=255), nullable=False),
|
||||
sa.Column('updated_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('created_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['message_correlation_property_id'], ['message_correlation_property.id'], ),
|
||||
sa.ForeignKeyConstraint(['process_instance_id'], ['process_instance.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('process_instance_id', 'message_correlation_property_id', 'name', name='message_instance_id_name_unique')
|
||||
op.create_table(
|
||||
"principal",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("user_id", sa.Integer(), nullable=True),
|
||||
sa.Column("group_id", sa.Integer(), nullable=True),
|
||||
sa.CheckConstraint("NOT(user_id IS NULL AND group_id IS NULL)"),
|
||||
sa.ForeignKeyConstraint(
|
||||
["group_id"],
|
||||
["group.id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["user_id"],
|
||||
["user.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint("group_id"),
|
||||
sa.UniqueConstraint("user_id"),
|
||||
)
|
||||
op.create_index(op.f('ix_message_correlation_message_correlation_property_id'), 'message_correlation', ['message_correlation_property_id'], unique=False)
|
||||
op.create_index(op.f('ix_message_correlation_name'), 'message_correlation', ['name'], unique=False)
|
||||
op.create_index(op.f('ix_message_correlation_process_instance_id'), 'message_correlation', ['process_instance_id'], unique=False)
|
||||
op.create_index(op.f('ix_message_correlation_value'), 'message_correlation', ['value'], unique=False)
|
||||
op.create_table('message_instance',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('process_instance_id', sa.Integer(), nullable=False),
|
||||
sa.Column('message_model_id', sa.Integer(), nullable=False),
|
||||
sa.Column('message_type', sa.String(length=20), nullable=False),
|
||||
sa.Column('payload', sa.JSON(), nullable=True),
|
||||
sa.Column('status', sa.String(length=20), nullable=False),
|
||||
sa.Column('failure_cause', sa.Text(), nullable=True),
|
||||
sa.Column('updated_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.Column('created_at_in_seconds', sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['message_model_id'], ['message_model.id'], ),
|
||||
sa.ForeignKeyConstraint(['process_instance_id'], ['process_instance.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
op.create_table(
|
||||
"process_instance",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("process_model_identifier", sa.String(length=255), nullable=False),
|
||||
sa.Column("process_group_identifier", sa.String(length=50), nullable=False),
|
||||
sa.Column("process_initiator_id", sa.Integer(), nullable=False),
|
||||
sa.Column("bpmn_json", sa.JSON(), nullable=True),
|
||||
sa.Column("start_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("end_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("updated_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("created_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("status", sa.String(length=50), nullable=True),
|
||||
sa.Column("bpmn_version_control_type", sa.String(length=50), nullable=True),
|
||||
sa.Column(
|
||||
"bpmn_version_control_identifier", sa.String(length=255), nullable=True
|
||||
),
|
||||
sa.Column("spiff_step", sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["process_initiator_id"],
|
||||
["user.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
op.create_table('permission_assignment',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('principal_id', sa.Integer(), nullable=False),
|
||||
sa.Column('permission_target_id', sa.Integer(), nullable=False),
|
||||
sa.Column('grant_type', sa.String(length=50), nullable=False),
|
||||
sa.Column('permission', sa.String(length=50), nullable=False),
|
||||
sa.ForeignKeyConstraint(['permission_target_id'], ['permission_target.id'], ),
|
||||
sa.ForeignKeyConstraint(['principal_id'], ['principal.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('principal_id', 'permission_target_id', 'permission', name='permission_assignment_uniq')
|
||||
op.create_index(
|
||||
op.f("ix_process_instance_process_group_identifier"),
|
||||
"process_instance",
|
||||
["process_group_identifier"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table('active_task_user',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('active_task_id', sa.Integer(), nullable=False),
|
||||
sa.Column('user_id', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['active_task_id'], ['active_task.id'], ),
|
||||
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('active_task_id', 'user_id', name='active_task_user_unique')
|
||||
op.create_index(
|
||||
op.f("ix_process_instance_process_model_identifier"),
|
||||
"process_instance",
|
||||
["process_model_identifier"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(op.f('ix_active_task_user_active_task_id'), 'active_task_user', ['active_task_id'], unique=False)
|
||||
op.create_index(op.f('ix_active_task_user_user_id'), 'active_task_user', ['user_id'], unique=False)
|
||||
op.create_table('message_correlation_message_instance',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('message_instance_id', sa.Integer(), nullable=False),
|
||||
sa.Column('message_correlation_id', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['message_correlation_id'], ['message_correlation.id'], ),
|
||||
sa.ForeignKeyConstraint(['message_instance_id'], ['message_instance.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('message_instance_id', 'message_correlation_id', name='message_correlation_message_instance_unique')
|
||||
op.create_table(
|
||||
"process_instance_report",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("identifier", sa.String(length=50), nullable=False),
|
||||
sa.Column("report_metadata", sa.JSON(), nullable=True),
|
||||
sa.Column("created_by_id", sa.Integer(), nullable=False),
|
||||
sa.Column("created_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("updated_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["created_by_id"],
|
||||
["user.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint(
|
||||
"created_by_id", "identifier", name="process_instance_report_unique"
|
||||
),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_process_instance_report_created_by_id"),
|
||||
"process_instance_report",
|
||||
["created_by_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_process_instance_report_identifier"),
|
||||
"process_instance_report",
|
||||
["identifier"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table(
|
||||
"refresh_token",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("user_id", sa.Integer(), nullable=False),
|
||||
sa.Column("token", sa.String(length=1024), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["user_id"],
|
||||
["user.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint("user_id"),
|
||||
)
|
||||
op.create_table(
|
||||
"secret",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("key", sa.String(length=50), nullable=False),
|
||||
sa.Column("value", sa.Text(), nullable=False),
|
||||
sa.Column("user_id", sa.Integer(), nullable=False),
|
||||
sa.Column("updated_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("created_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["user_id"],
|
||||
["user.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint("key"),
|
||||
)
|
||||
op.create_table(
|
||||
"spiff_step_details",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("process_instance_id", sa.Integer(), nullable=False),
|
||||
sa.Column("spiff_step", sa.Integer(), nullable=False),
|
||||
sa.Column("task_json", sa.JSON(), nullable=False),
|
||||
sa.Column("timestamp", sa.DECIMAL(precision=17, scale=6), nullable=False),
|
||||
sa.Column("completed_by_user_id", sa.Integer(), nullable=True),
|
||||
sa.Column("lane_assignment_id", sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["lane_assignment_id"],
|
||||
["group.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
op.create_table(
|
||||
"user_group_assignment",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("user_id", sa.Integer(), nullable=False),
|
||||
sa.Column("group_id", sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["group_id"],
|
||||
["group.id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["user_id"],
|
||||
["user.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint("user_id", "group_id", name="user_group_assignment_unique"),
|
||||
)
|
||||
op.create_table(
|
||||
"active_task",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("process_instance_id", sa.Integer(), nullable=False),
|
||||
sa.Column("actual_owner_id", sa.Integer(), nullable=True),
|
||||
sa.Column("lane_assignment_id", sa.Integer(), nullable=True),
|
||||
sa.Column("form_file_name", sa.String(length=50), nullable=True),
|
||||
sa.Column("ui_form_file_name", sa.String(length=50), nullable=True),
|
||||
sa.Column("updated_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("created_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("task_id", sa.String(length=50), nullable=True),
|
||||
sa.Column("task_name", sa.String(length=50), nullable=True),
|
||||
sa.Column("task_title", sa.String(length=50), nullable=True),
|
||||
sa.Column("task_type", sa.String(length=50), nullable=True),
|
||||
sa.Column("task_status", sa.String(length=50), nullable=True),
|
||||
sa.Column("process_model_display_name", sa.String(length=255), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["actual_owner_id"],
|
||||
["user.id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["lane_assignment_id"],
|
||||
["group.id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["process_instance_id"],
|
||||
["process_instance.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint(
|
||||
"task_id", "process_instance_id", name="active_task_unique"
|
||||
),
|
||||
)
|
||||
op.create_table(
|
||||
"message_correlation",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("process_instance_id", sa.Integer(), nullable=False),
|
||||
sa.Column("message_correlation_property_id", sa.Integer(), nullable=False),
|
||||
sa.Column("name", sa.String(length=255), nullable=False),
|
||||
sa.Column("value", sa.String(length=255), nullable=False),
|
||||
sa.Column("updated_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("created_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["message_correlation_property_id"],
|
||||
["message_correlation_property.id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["process_instance_id"],
|
||||
["process_instance.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint(
|
||||
"process_instance_id",
|
||||
"message_correlation_property_id",
|
||||
"name",
|
||||
name="message_instance_id_name_unique",
|
||||
),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_message_correlation_message_correlation_property_id"),
|
||||
"message_correlation",
|
||||
["message_correlation_property_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_message_correlation_name"),
|
||||
"message_correlation",
|
||||
["name"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_message_correlation_process_instance_id"),
|
||||
"message_correlation",
|
||||
["process_instance_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_message_correlation_value"),
|
||||
"message_correlation",
|
||||
["value"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table(
|
||||
"message_instance",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("process_instance_id", sa.Integer(), nullable=False),
|
||||
sa.Column("message_model_id", sa.Integer(), nullable=False),
|
||||
sa.Column("message_type", sa.String(length=20), nullable=False),
|
||||
sa.Column("payload", sa.JSON(), nullable=True),
|
||||
sa.Column("status", sa.String(length=20), nullable=False),
|
||||
sa.Column("failure_cause", sa.Text(), nullable=True),
|
||||
sa.Column("updated_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.Column("created_at_in_seconds", sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["message_model_id"],
|
||||
["message_model.id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["process_instance_id"],
|
||||
["process_instance.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
op.create_table(
|
||||
"permission_assignment",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("principal_id", sa.Integer(), nullable=False),
|
||||
sa.Column("permission_target_id", sa.Integer(), nullable=False),
|
||||
sa.Column("grant_type", sa.String(length=50), nullable=False),
|
||||
sa.Column("permission", sa.String(length=50), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["permission_target_id"],
|
||||
["permission_target.id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["principal_id"],
|
||||
["principal.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint(
|
||||
"principal_id",
|
||||
"permission_target_id",
|
||||
"permission",
|
||||
name="permission_assignment_uniq",
|
||||
),
|
||||
)
|
||||
op.create_table(
|
||||
"active_task_user",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("active_task_id", sa.Integer(), nullable=False),
|
||||
sa.Column("user_id", sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["active_task_id"],
|
||||
["active_task.id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["user_id"],
|
||||
["user.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint(
|
||||
"active_task_id", "user_id", name="active_task_user_unique"
|
||||
),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_active_task_user_active_task_id"),
|
||||
"active_task_user",
|
||||
["active_task_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_active_task_user_user_id"),
|
||||
"active_task_user",
|
||||
["user_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_table(
|
||||
"message_correlation_message_instance",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("message_instance_id", sa.Integer(), nullable=False),
|
||||
sa.Column("message_correlation_id", sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["message_correlation_id"],
|
||||
["message_correlation.id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["message_instance_id"],
|
||||
["message_instance.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint(
|
||||
"message_instance_id",
|
||||
"message_correlation_id",
|
||||
name="message_correlation_message_instance_unique",
|
||||
),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_message_correlation_message_instance_message_correlation_id"),
|
||||
"message_correlation_message_instance",
|
||||
["message_correlation_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_message_correlation_message_instance_message_instance_id"),
|
||||
"message_correlation_message_instance",
|
||||
["message_instance_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(op.f('ix_message_correlation_message_instance_message_correlation_id'), 'message_correlation_message_instance', ['message_correlation_id'], unique=False)
|
||||
op.create_index(op.f('ix_message_correlation_message_instance_message_instance_id'), 'message_correlation_message_instance', ['message_instance_id'], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f('ix_message_correlation_message_instance_message_instance_id'), table_name='message_correlation_message_instance')
|
||||
op.drop_index(op.f('ix_message_correlation_message_instance_message_correlation_id'), table_name='message_correlation_message_instance')
|
||||
op.drop_table('message_correlation_message_instance')
|
||||
op.drop_index(op.f('ix_active_task_user_user_id'), table_name='active_task_user')
|
||||
op.drop_index(op.f('ix_active_task_user_active_task_id'), table_name='active_task_user')
|
||||
op.drop_table('active_task_user')
|
||||
op.drop_table('permission_assignment')
|
||||
op.drop_table('message_instance')
|
||||
op.drop_index(op.f('ix_message_correlation_value'), table_name='message_correlation')
|
||||
op.drop_index(op.f('ix_message_correlation_process_instance_id'), table_name='message_correlation')
|
||||
op.drop_index(op.f('ix_message_correlation_name'), table_name='message_correlation')
|
||||
op.drop_index(op.f('ix_message_correlation_message_correlation_property_id'), table_name='message_correlation')
|
||||
op.drop_table('message_correlation')
|
||||
op.drop_table('active_task')
|
||||
op.drop_table('user_group_assignment')
|
||||
op.drop_table('spiff_step_details')
|
||||
op.drop_table('secret')
|
||||
op.drop_table('refresh_token')
|
||||
op.drop_index(op.f('ix_process_instance_report_identifier'), table_name='process_instance_report')
|
||||
op.drop_index(op.f('ix_process_instance_report_created_by_id'), table_name='process_instance_report')
|
||||
op.drop_table('process_instance_report')
|
||||
op.drop_index(op.f('ix_process_instance_process_model_identifier'), table_name='process_instance')
|
||||
op.drop_index(op.f('ix_process_instance_process_group_identifier'), table_name='process_instance')
|
||||
op.drop_table('process_instance')
|
||||
op.drop_table('principal')
|
||||
op.drop_index(op.f('ix_message_triggerable_process_model_process_model_identifier'), table_name='message_triggerable_process_model')
|
||||
op.drop_index(op.f('ix_message_triggerable_process_model_process_group_identifier'), table_name='message_triggerable_process_model')
|
||||
op.drop_table('message_triggerable_process_model')
|
||||
op.drop_index(op.f('ix_message_correlation_property_identifier'), table_name='message_correlation_property')
|
||||
op.drop_table('message_correlation_property')
|
||||
op.drop_table('user')
|
||||
op.drop_table('spiff_logging')
|
||||
op.drop_index(op.f('ix_spec_reference_cache_type'), table_name='spec_reference_cache')
|
||||
op.drop_index(op.f('ix_spec_reference_cache_identifier'), table_name='spec_reference_cache')
|
||||
op.drop_index(op.f('ix_spec_reference_cache_display_name'), table_name='spec_reference_cache')
|
||||
op.drop_table('spec_reference_cache')
|
||||
op.drop_table('permission_target')
|
||||
op.drop_index(op.f('ix_message_model_name'), table_name='message_model')
|
||||
op.drop_index(op.f('ix_message_model_identifier'), table_name='message_model')
|
||||
op.drop_table('message_model')
|
||||
op.drop_table('group')
|
||||
op.drop_index(
|
||||
op.f("ix_message_correlation_message_instance_message_instance_id"),
|
||||
table_name="message_correlation_message_instance",
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_message_correlation_message_instance_message_correlation_id"),
|
||||
table_name="message_correlation_message_instance",
|
||||
)
|
||||
op.drop_table("message_correlation_message_instance")
|
||||
op.drop_index(op.f("ix_active_task_user_user_id"), table_name="active_task_user")
|
||||
op.drop_index(
|
||||
op.f("ix_active_task_user_active_task_id"), table_name="active_task_user"
|
||||
)
|
||||
op.drop_table("active_task_user")
|
||||
op.drop_table("permission_assignment")
|
||||
op.drop_table("message_instance")
|
||||
op.drop_index(
|
||||
op.f("ix_message_correlation_value"), table_name="message_correlation"
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_message_correlation_process_instance_id"),
|
||||
table_name="message_correlation",
|
||||
)
|
||||
op.drop_index(op.f("ix_message_correlation_name"), table_name="message_correlation")
|
||||
op.drop_index(
|
||||
op.f("ix_message_correlation_message_correlation_property_id"),
|
||||
table_name="message_correlation",
|
||||
)
|
||||
op.drop_table("message_correlation")
|
||||
op.drop_table("active_task")
|
||||
op.drop_table("user_group_assignment")
|
||||
op.drop_table("spiff_step_details")
|
||||
op.drop_table("secret")
|
||||
op.drop_table("refresh_token")
|
||||
op.drop_index(
|
||||
op.f("ix_process_instance_report_identifier"),
|
||||
table_name="process_instance_report",
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_process_instance_report_created_by_id"),
|
||||
table_name="process_instance_report",
|
||||
)
|
||||
op.drop_table("process_instance_report")
|
||||
op.drop_index(
|
||||
op.f("ix_process_instance_process_model_identifier"),
|
||||
table_name="process_instance",
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_process_instance_process_group_identifier"),
|
||||
table_name="process_instance",
|
||||
)
|
||||
op.drop_table("process_instance")
|
||||
op.drop_table("principal")
|
||||
op.drop_index(
|
||||
op.f("ix_message_triggerable_process_model_process_model_identifier"),
|
||||
table_name="message_triggerable_process_model",
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_message_triggerable_process_model_process_group_identifier"),
|
||||
table_name="message_triggerable_process_model",
|
||||
)
|
||||
op.drop_table("message_triggerable_process_model")
|
||||
op.drop_index(
|
||||
op.f("ix_message_correlation_property_identifier"),
|
||||
table_name="message_correlation_property",
|
||||
)
|
||||
op.drop_table("message_correlation_property")
|
||||
op.drop_table("user")
|
||||
op.drop_table("spiff_logging")
|
||||
op.drop_index(
|
||||
op.f("ix_spec_reference_cache_type"), table_name="spec_reference_cache"
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_spec_reference_cache_identifier"), table_name="spec_reference_cache"
|
||||
)
|
||||
op.drop_index(
|
||||
op.f("ix_spec_reference_cache_display_name"), table_name="spec_reference_cache"
|
||||
)
|
||||
op.drop_table("spec_reference_cache")
|
||||
op.drop_table("permission_target")
|
||||
op.drop_index(op.f("ix_message_model_name"), table_name="message_model")
|
||||
op.drop_index(op.f("ix_message_model_identifier"), table_name="message_model")
|
||||
op.drop_table("message_model")
|
||||
op.drop_table("group")
|
||||
# ### end Alembic commands ###
|
||||
|
|
|
@ -5,6 +5,7 @@ from typing import Any
|
|||
import connexion # type: ignore
|
||||
import flask.app
|
||||
import flask.json
|
||||
import spiffworkflow_backend.load_database_models # noqa: F401
|
||||
import sqlalchemy
|
||||
from apscheduler.schedulers.background import BackgroundScheduler # type: ignore
|
||||
from apscheduler.schedulers.base import BaseScheduler # type: ignore
|
||||
|
@ -14,9 +15,6 @@ from flask_bpmn.models.db import db
|
|||
from flask_bpmn.models.db import migrate
|
||||
from flask_cors import CORS # type: ignore
|
||||
from flask_mail import Mail # type: ignore
|
||||
from werkzeug.exceptions import NotFound
|
||||
|
||||
import spiffworkflow_backend.load_database_models # noqa: F401
|
||||
from spiffworkflow_backend.config import setup_config
|
||||
from spiffworkflow_backend.routes.admin_blueprint.admin_blueprint import admin_blueprint
|
||||
from spiffworkflow_backend.routes.process_api_blueprint import process_api_blueprint
|
||||
|
@ -26,6 +24,7 @@ from spiffworkflow_backend.services.authorization_service import AuthorizationSe
|
|||
from spiffworkflow_backend.services.background_processing_service import (
|
||||
BackgroundProcessingService,
|
||||
)
|
||||
from werkzeug.exceptions import NotFound
|
||||
|
||||
|
||||
class MyJSONEncoder(DefaultJSONProvider):
|
||||
|
|
|
@ -375,8 +375,9 @@ paths:
|
|||
/processes:
|
||||
get:
|
||||
operationId: spiffworkflow_backend.routes.process_api_blueprint.process_list
|
||||
summary: Return a list of all processes (not just primary process of a process model)
|
||||
useful for finding processes for call activites.
|
||||
summary:
|
||||
Return a list of all processes (not just primary process of a process model)
|
||||
useful for finding processes for call activites.
|
||||
tags:
|
||||
- Process Models
|
||||
responses:
|
||||
|
|
|
@ -3,9 +3,8 @@ import os
|
|||
import threading
|
||||
|
||||
from flask.app import Flask
|
||||
from werkzeug.utils import ImportStringError
|
||||
|
||||
from spiffworkflow_backend.services.logging_service import setup_logger
|
||||
from werkzeug.utils import ImportStringError
|
||||
|
||||
|
||||
class ConfigurationError(Exception):
|
||||
|
|
|
@ -6,14 +6,13 @@ from typing import TYPE_CHECKING
|
|||
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm import RelationshipProperty
|
||||
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||
from spiffworkflow_backend.models.task import Task
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm import RelationshipProperty
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
|
@ -5,10 +5,9 @@ from dataclasses import dataclass
|
|||
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from sqlalchemy import ForeignKey
|
||||
|
||||
from spiffworkflow_backend.models.active_task import ActiveTaskModel
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from sqlalchemy import ForeignKey
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -7,7 +7,6 @@ from typing import Optional
|
|||
import marshmallow
|
||||
from marshmallow import INCLUDE
|
||||
from marshmallow import Schema
|
||||
|
||||
from spiffworkflow_backend.helpers.spiff_enum import SpiffEnum
|
||||
from spiffworkflow_backend.models.spec_reference import SpecReference
|
||||
|
||||
|
|
|
@ -4,13 +4,12 @@ from typing import TYPE_CHECKING
|
|||
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from spiffworkflow_backend.models.message_correlation_property import (
|
||||
MessageCorrelationPropertyModel,
|
||||
)
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from spiffworkflow_backend.models.message_correlation_message_instance import ( # noqa: F401
|
||||
|
|
|
@ -3,10 +3,9 @@ from dataclasses import dataclass
|
|||
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from sqlalchemy import ForeignKey
|
||||
|
||||
from spiffworkflow_backend.models.message_correlation import MessageCorrelationModel
|
||||
from spiffworkflow_backend.models.message_instance import MessageInstanceModel
|
||||
from sqlalchemy import ForeignKey
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
"""Message_correlation_property."""
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from sqlalchemy import ForeignKey
|
||||
|
||||
from spiffworkflow_backend.models.message_model import MessageModel
|
||||
from sqlalchemy import ForeignKey
|
||||
|
||||
|
||||
class MessageCorrelationPropertyModel(SpiffworkflowBaseDBModel):
|
||||
|
|
|
@ -7,15 +7,14 @@ from typing import TYPE_CHECKING
|
|||
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from spiffworkflow_backend.models.message_model import MessageModel
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.event import listens_for
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy.orm import validates
|
||||
|
||||
from spiffworkflow_backend.models.message_model import MessageModel
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from spiffworkflow_backend.models.message_correlation_message_instance import ( # noqa: F401
|
||||
MessageCorrelationMessageInstanceModel,
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
"""Message_correlation_property."""
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from sqlalchemy import ForeignKey
|
||||
|
||||
from spiffworkflow_backend.models.message_model import MessageModel
|
||||
from sqlalchemy import ForeignKey
|
||||
|
||||
|
||||
class MessageTriggerableProcessModel(SpiffworkflowBaseDBModel):
|
||||
|
|
|
@ -4,11 +4,10 @@ from typing import Any
|
|||
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import validates
|
||||
|
||||
from spiffworkflow_backend.models.permission_target import PermissionTargetModel
|
||||
from spiffworkflow_backend.models.principal import PrincipalModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import validates
|
||||
|
||||
|
||||
class PermitDeny(enum.Enum):
|
||||
|
|
|
@ -3,13 +3,12 @@ from dataclasses import dataclass
|
|||
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.schema import CheckConstraint
|
||||
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
|
||||
|
||||
class DataValidityError(Exception):
|
||||
"""DataValidityError."""
|
||||
|
|
|
@ -9,7 +9,6 @@ from typing import Any
|
|||
import marshmallow
|
||||
from marshmallow import post_load
|
||||
from marshmallow import Schema
|
||||
|
||||
from spiffworkflow_backend.models.process_model import ProcessModelInfo
|
||||
|
||||
|
||||
|
|
|
@ -12,16 +12,15 @@ from marshmallow import INCLUDE
|
|||
from marshmallow import Schema
|
||||
from marshmallow_enum import EnumField # type: ignore
|
||||
from SpiffWorkflow.util.deep_merge import DeepMerge # type: ignore
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import deferred
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm import validates
|
||||
|
||||
from spiffworkflow_backend.helpers.spiff_enum import SpiffEnum
|
||||
from spiffworkflow_backend.models.process_model import ProcessModelInfo
|
||||
from spiffworkflow_backend.models.task import Task
|
||||
from spiffworkflow_backend.models.task import TaskSchema
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import deferred
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm import validates
|
||||
|
||||
|
||||
class NavigationItemSchema(Schema):
|
||||
|
|
|
@ -9,10 +9,6 @@ from typing import TypedDict
|
|||
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import deferred
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from spiffworkflow_backend.exceptions.process_entity_not_found_error import (
|
||||
ProcessEntityNotFoundError,
|
||||
)
|
||||
|
@ -21,6 +17,9 @@ from spiffworkflow_backend.models.user import UserModel
|
|||
from spiffworkflow_backend.services.process_instance_processor import (
|
||||
ProcessInstanceProcessor,
|
||||
)
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import deferred
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
|
||||
ReportMetadata = dict[str, Any]
|
||||
|
|
|
@ -10,7 +10,6 @@ from typing import Any
|
|||
import marshmallow
|
||||
from marshmallow import Schema
|
||||
from marshmallow.decorators import post_load
|
||||
|
||||
from spiffworkflow_backend.models.file import File
|
||||
|
||||
|
||||
|
|
|
@ -4,9 +4,8 @@ from dataclasses import dataclass
|
|||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from marshmallow import Schema
|
||||
from sqlalchemy import ForeignKey
|
||||
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from sqlalchemy import ForeignKey
|
||||
|
||||
|
||||
@dataclass()
|
||||
|
|
|
@ -4,11 +4,10 @@ from typing import Optional
|
|||
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import deferred
|
||||
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
|
||||
|
||||
@dataclass
|
||||
class SpiffStepDetailsModel(SpiffworkflowBaseDBModel):
|
||||
|
|
|
@ -10,13 +10,12 @@ from flask_bpmn.api.api_error import ApiError
|
|||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from marshmallow import Schema
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm import validates
|
||||
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from spiffworkflow_backend.services.authentication_service import (
|
||||
AuthenticationProviderTypes,
|
||||
)
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm import validates
|
||||
|
||||
|
||||
class UserNotFoundError(Exception):
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
"""UserGroupAssignment."""
|
||||
from flask_bpmn.models.db import db
|
||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from sqlalchemy import ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
|
||||
class UserGroupAssignmentModel(SpiffworkflowBaseDBModel):
|
||||
|
|
|
@ -7,8 +7,6 @@ from flask import redirect
|
|||
from flask import render_template
|
||||
from flask import request
|
||||
from flask import url_for
|
||||
from werkzeug.wrappers import Response
|
||||
|
||||
from spiffworkflow_backend.services.process_instance_processor import (
|
||||
ProcessInstanceProcessor,
|
||||
)
|
||||
|
@ -18,6 +16,7 @@ from spiffworkflow_backend.services.process_instance_service import (
|
|||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from spiffworkflow_backend.services.spec_file_service import SpecFileService
|
||||
from spiffworkflow_backend.services.user_service import UserService
|
||||
from werkzeug.wrappers import Response
|
||||
|
||||
admin_blueprint = Blueprint(
|
||||
"admin", __name__, template_folder="templates", static_folder="static"
|
||||
|
|
|
@ -27,10 +27,6 @@ from lxml import etree # type: ignore
|
|||
from lxml.builder import ElementMaker # type: ignore
|
||||
from SpiffWorkflow.task import Task as SpiffTask # type: ignore
|
||||
from SpiffWorkflow.task import TaskState
|
||||
from sqlalchemy import and_
|
||||
from sqlalchemy import asc
|
||||
from sqlalchemy import desc
|
||||
|
||||
from spiffworkflow_backend.exceptions.process_entity_not_found_error import (
|
||||
ProcessEntityNotFoundError,
|
||||
)
|
||||
|
@ -86,6 +82,9 @@ from spiffworkflow_backend.services.secret_service import SecretService
|
|||
from spiffworkflow_backend.services.service_task_service import ServiceTaskService
|
||||
from spiffworkflow_backend.services.spec_file_service import SpecFileService
|
||||
from spiffworkflow_backend.services.user_service import UserService
|
||||
from sqlalchemy import and_
|
||||
from sqlalchemy import asc
|
||||
from sqlalchemy import desc
|
||||
|
||||
|
||||
class TaskDataSelectOption(TypedDict):
|
||||
|
|
|
@ -12,14 +12,13 @@ from flask import g
|
|||
from flask import redirect
|
||||
from flask import request
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
from werkzeug.wrappers import Response
|
||||
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.authentication_service import (
|
||||
AuthenticationService,
|
||||
)
|
||||
from spiffworkflow_backend.services.authorization_service import AuthorizationService
|
||||
from spiffworkflow_backend.services.user_service import UserService
|
||||
from werkzeug.wrappers import Response
|
||||
|
||||
"""
|
||||
.. module:: crc.api.user
|
||||
|
|
|
@ -9,11 +9,10 @@ from flask import request
|
|||
from flask import Response
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
from flask_bpmn.models.db import db
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.models.user_group_assignment import UserGroupAssignmentModel
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
|
||||
APPLICATION_JSON: Final = "application/json"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
from typing import Any
|
||||
|
||||
from flask import g
|
||||
|
||||
from spiffworkflow_backend.models.script_attributes_context import (
|
||||
ScriptAttributesContext,
|
||||
)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
from typing import Any
|
||||
|
||||
from flask import current_app
|
||||
|
||||
from spiffworkflow_backend.models.script_attributes_context import (
|
||||
ScriptAttributesContext,
|
||||
)
|
||||
|
|
|
@ -4,7 +4,6 @@ from typing import Any
|
|||
|
||||
import pytz
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
|
||||
from spiffworkflow_backend.models.script_attributes_context import (
|
||||
ScriptAttributesContext,
|
||||
)
|
||||
|
|
|
@ -9,7 +9,6 @@ from typing import Any
|
|||
from typing import Callable
|
||||
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
|
||||
from spiffworkflow_backend.models.script_attributes_context import (
|
||||
ScriptAttributesContext,
|
||||
)
|
||||
|
|
|
@ -4,10 +4,9 @@ import time
|
|||
|
||||
from flask import current_app
|
||||
from flask_bpmn.models.db import db
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceStatus
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
def load_acceptance_test_fixtures() -> list[ProcessInstanceModel]:
|
||||
|
|
|
@ -11,9 +11,8 @@ from flask import current_app
|
|||
from flask import redirect
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
from flask_bpmn.models.db import db
|
||||
from werkzeug.wrappers import Response
|
||||
|
||||
from spiffworkflow_backend.models.refresh_token import RefreshTokenModel
|
||||
from werkzeug.wrappers import Response
|
||||
|
||||
|
||||
class AuthenticationProviderTypes(enum.Enum):
|
||||
|
|
|
@ -11,9 +11,6 @@ from flask import request
|
|||
from flask_bpmn.api.api_error import ApiError
|
||||
from flask_bpmn.models.db import db
|
||||
from SpiffWorkflow.task import Task as SpiffTask # type: ignore
|
||||
from sqlalchemy import or_
|
||||
from sqlalchemy import text
|
||||
|
||||
from spiffworkflow_backend.models.active_task import ActiveTaskModel
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from spiffworkflow_backend.models.permission_assignment import PermissionAssignmentModel
|
||||
|
@ -28,6 +25,8 @@ from spiffworkflow_backend.services.process_instance_processor import (
|
|||
ProcessInstanceProcessor,
|
||||
)
|
||||
from spiffworkflow_backend.services.user_service import UserService
|
||||
from sqlalchemy import or_
|
||||
from sqlalchemy import text
|
||||
|
||||
|
||||
class PermissionsFileNotSetError(Exception):
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Background_processing_service."""
|
||||
import flask
|
||||
|
||||
from spiffworkflow_backend.services.message_service import MessageService
|
||||
from spiffworkflow_backend.services.process_instance_service import (
|
||||
ProcessInstanceService,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"""Data_setup_service."""
|
||||
from flask import current_app
|
||||
from flask_bpmn.models.db import db
|
||||
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from spiffworkflow_backend.services.spec_file_service import SpecFileService
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ from typing import Union
|
|||
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
from flask_bpmn.models.db import db
|
||||
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceStatus
|
||||
from spiffworkflow_backend.services.email_service import EmailService
|
||||
|
|
|
@ -7,7 +7,6 @@ from typing import Optional
|
|||
import pytz
|
||||
from flask import current_app
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
|
||||
from spiffworkflow_backend.models.file import CONTENT_TYPES
|
||||
from spiffworkflow_backend.models.file import File
|
||||
from spiffworkflow_backend.models.file import FileType
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import os
|
||||
|
||||
from flask import current_app
|
||||
|
||||
from spiffworkflow_backend.models.process_model import ProcessModelInfo
|
||||
from spiffworkflow_backend.services.file_system_service import FileSystemService
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
from typing import Optional
|
||||
|
||||
from flask_bpmn.models.db import db
|
||||
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from spiffworkflow_backend.services.user_service import UserService
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ from typing import Optional
|
|||
from flask import g
|
||||
from flask.app import Flask
|
||||
from flask_bpmn.models.db import db
|
||||
|
||||
from spiffworkflow_backend.models.spiff_logging import SpiffLoggingModel
|
||||
|
||||
|
||||
|
|
|
@ -3,10 +3,6 @@ from typing import Any
|
|||
from typing import Optional
|
||||
|
||||
from flask_bpmn.models.db import db
|
||||
from sqlalchemy import and_
|
||||
from sqlalchemy import or_
|
||||
from sqlalchemy import select
|
||||
|
||||
from spiffworkflow_backend.models.message_correlation import MessageCorrelationModel
|
||||
from spiffworkflow_backend.models.message_correlation_message_instance import (
|
||||
MessageCorrelationMessageInstanceModel,
|
||||
|
@ -23,6 +19,9 @@ from spiffworkflow_backend.services.process_instance_processor import (
|
|||
from spiffworkflow_backend.services.process_instance_service import (
|
||||
ProcessInstanceService,
|
||||
)
|
||||
from sqlalchemy import and_
|
||||
from sqlalchemy import or_
|
||||
from sqlalchemy import select
|
||||
|
||||
|
||||
class MessageServiceError(Exception):
|
||||
|
|
|
@ -64,7 +64,6 @@ from SpiffWorkflow.spiff.serializer.task_spec_converters import UserTaskConverte
|
|||
from SpiffWorkflow.task import Task as SpiffTask # type: ignore
|
||||
from SpiffWorkflow.task import TaskState
|
||||
from SpiffWorkflow.util.deep_merge import DeepMerge # type: ignore
|
||||
|
||||
from spiffworkflow_backend.models.active_task import ActiveTaskModel
|
||||
from spiffworkflow_backend.models.active_task_user import ActiveTaskUserModel
|
||||
from spiffworkflow_backend.models.file import File
|
||||
|
|
|
@ -7,7 +7,6 @@ from flask import current_app
|
|||
from flask_bpmn.api.api_error import ApiError
|
||||
from flask_bpmn.models.db import db
|
||||
from SpiffWorkflow.task import Task as SpiffTask # type: ignore
|
||||
|
||||
from spiffworkflow_backend.models.active_task import ActiveTaskModel
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceApi
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||
|
@ -320,7 +319,7 @@ class ProcessInstanceService:
|
|||
def serialize_flat_with_task_data(
|
||||
process_instance: ProcessInstanceModel,
|
||||
) -> dict[str, Any]:
|
||||
"""serialize_flat_with_task_data."""
|
||||
"""Serialize_flat_with_task_data."""
|
||||
results = {}
|
||||
try:
|
||||
original_status = process_instance.status
|
||||
|
|
|
@ -8,7 +8,6 @@ from typing import Optional
|
|||
from typing import TypeVar
|
||||
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
|
||||
from spiffworkflow_backend.exceptions.process_entity_not_found_error import (
|
||||
ProcessEntityNotFoundError,
|
||||
)
|
||||
|
@ -49,7 +48,9 @@ class ProcessModelService(FileSystemService):
|
|||
return False
|
||||
|
||||
@staticmethod
|
||||
def write_json_file(file_path: str, json_data: dict, indent: int = 4, sort_keys: bool = True) -> None:
|
||||
def write_json_file(
|
||||
file_path: str, json_data: dict, indent: int = 4, sort_keys: bool = True
|
||||
) -> None:
|
||||
"""Write json file."""
|
||||
with open(file_path, "w") as h_open:
|
||||
json.dump(json_data, h_open, indent=indent, sort_keys=sort_keys)
|
||||
|
@ -309,7 +310,7 @@ class ProcessModelService(FileSystemService):
|
|||
else:
|
||||
process_group_id = dir_path.replace(FileSystemService.root_path(), "")
|
||||
process_group = ProcessGroup(
|
||||
id='',
|
||||
id="",
|
||||
display_name=process_group_id,
|
||||
display_order=10000,
|
||||
admin=False,
|
||||
|
@ -371,7 +372,7 @@ class ProcessModelService(FileSystemService):
|
|||
)
|
||||
|
||||
process_model_info = ProcessModelInfo(
|
||||
id='',
|
||||
id="",
|
||||
display_name=name,
|
||||
description="",
|
||||
display_order=0,
|
||||
|
|
|
@ -8,7 +8,6 @@ from typing import Optional
|
|||
|
||||
from SpiffWorkflow.bpmn.exceptions import WorkflowTaskExecException # type: ignore
|
||||
from SpiffWorkflow.task import Task as SpiffTask # type: ignore
|
||||
|
||||
from spiffworkflow_backend.services.process_instance_processor import (
|
||||
CustomBpmnScriptEngine,
|
||||
)
|
||||
|
|
|
@ -3,7 +3,6 @@ from typing import Optional
|
|||
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
from flask_bpmn.models.db import db
|
||||
|
||||
from spiffworkflow_backend.models.secret_model import SecretModel
|
||||
|
||||
# from cryptography.fernet import Fernet
|
||||
|
|
|
@ -5,7 +5,6 @@ from typing import Any
|
|||
import requests
|
||||
from flask import current_app
|
||||
from flask import g
|
||||
|
||||
from spiffworkflow_backend.services.file_system_service import FileSystemService
|
||||
from spiffworkflow_backend.services.secret_service import SecretService
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ from typing import Optional
|
|||
|
||||
from flask_bpmn.models.db import db
|
||||
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException # type: ignore
|
||||
|
||||
from spiffworkflow_backend.models.file import File
|
||||
from spiffworkflow_backend.models.file import FileType
|
||||
from spiffworkflow_backend.models.file import SpecReference
|
||||
|
|
|
@ -6,7 +6,6 @@ from flask import current_app
|
|||
from flask import g
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
from flask_bpmn.models.db import db
|
||||
|
||||
from spiffworkflow_backend.models.active_task import ActiveTaskModel
|
||||
from spiffworkflow_backend.models.active_task_user import ActiveTaskUserModel
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
"title": "Simple form",
|
||||
"description": "A simple form example.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"required": ["name"],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
|
@ -14,11 +12,7 @@
|
|||
"department": {
|
||||
"type": "string",
|
||||
"title": "Department",
|
||||
"enum": [
|
||||
"Finance",
|
||||
"HR",
|
||||
"IT"
|
||||
]
|
||||
"enum": ["Finance", "HR", "IT"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"name": {
|
||||
"name": {
|
||||
"ui:title": "Name",
|
||||
"ui:description": "(Your name)"
|
||||
},
|
||||
"department": {
|
||||
"department": {
|
||||
"ui:title": "Department",
|
||||
"ui:description": "(Your department)"
|
||||
},
|
||||
|
|
|
@ -11,9 +11,6 @@ from flask import current_app
|
|||
from flask.testing import FlaskClient
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
from flask_bpmn.models.db import db
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
from werkzeug.test import TestResponse # type: ignore
|
||||
|
||||
from spiffworkflow_backend.models.permission_assignment import Permission
|
||||
from spiffworkflow_backend.models.permission_target import PermissionTargetModel
|
||||
from spiffworkflow_backend.models.process_group import ProcessGroup
|
||||
|
@ -27,6 +24,8 @@ from spiffworkflow_backend.services.authorization_service import AuthorizationSe
|
|||
from spiffworkflow_backend.services.file_system_service import FileSystemService
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from spiffworkflow_backend.services.user_service import UserService
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
from werkzeug.test import TestResponse # type: ignore
|
||||
|
||||
# from tests.spiffworkflow_backend.helpers.test_data import logged_in_headers
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import os
|
|||
from typing import Optional
|
||||
|
||||
from flask import current_app
|
||||
|
||||
from spiffworkflow_backend.models.process_model import ProcessModelInfo
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from spiffworkflow_backend.services.spec_file_service import SpecFileService
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
"""User."""
|
||||
from typing import Optional
|
||||
|
||||
from tests.spiffworkflow_backend.helpers.example_data import ExampleDataLoader
|
||||
|
||||
from spiffworkflow_backend.exceptions.process_entity_not_found_error import (
|
||||
ProcessEntityNotFoundError,
|
||||
)
|
||||
from spiffworkflow_backend.models.process_group import ProcessGroup
|
||||
from spiffworkflow_backend.models.process_model import ProcessModelInfo
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from tests.spiffworkflow_backend.helpers.example_data import ExampleDataLoader
|
||||
|
||||
|
||||
def assure_process_group_exists(process_group_id: Optional[str] = None) -> ProcessGroup:
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
import ast
|
||||
import base64
|
||||
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.services.authentication_service import (
|
||||
AuthenticationService,
|
||||
)
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
class TestAuthentication(BaseTest):
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
"""Test_logging_service."""
|
||||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
class TestLoggingService(BaseTest):
|
||||
|
|
|
@ -3,8 +3,6 @@ import json
|
|||
|
||||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.models.process_group import ProcessGroup
|
||||
from spiffworkflow_backend.models.process_group import ProcessGroupSchema
|
||||
from spiffworkflow_backend.models.process_model import ProcessModelInfo
|
||||
|
@ -13,6 +11,7 @@ from spiffworkflow_backend.models.user import UserModel
|
|||
from spiffworkflow_backend.services.process_instance_service import (
|
||||
ProcessInstanceService,
|
||||
)
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
class TestNestedGroups(BaseTest):
|
||||
|
|
|
@ -9,9 +9,6 @@ import pytest
|
|||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from flask_bpmn.models.db import db
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.exceptions.process_entity_not_found_error import (
|
||||
ProcessEntityNotFoundError,
|
||||
)
|
||||
|
@ -36,6 +33,8 @@ from spiffworkflow_backend.services.process_instance_service import (
|
|||
ProcessInstanceService,
|
||||
)
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
# from spiffworkflow_backend.services.git_service import GitService
|
||||
|
||||
|
|
|
@ -6,15 +6,14 @@ import pytest
|
|||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from werkzeug.test import TestResponse # type: ignore
|
||||
|
||||
from spiffworkflow_backend.models.process_model import ProcessModelInfo
|
||||
from spiffworkflow_backend.models.secret_model import SecretModel
|
||||
from spiffworkflow_backend.models.secret_model import SecretModelSchema
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from spiffworkflow_backend.services.secret_service import SecretService
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from werkzeug.test import TestResponse # type: ignore
|
||||
|
||||
|
||||
class SecretServiceTestHelpers(BaseTest):
|
||||
|
|
|
@ -2,15 +2,14 @@
|
|||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from flask_bpmn.models.db import db
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.process_instance_processor import (
|
||||
ProcessInstanceProcessor,
|
||||
)
|
||||
from spiffworkflow_backend.services.user_service import UserService
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
|
||||
class TestGetGroupMembers(BaseTest):
|
||||
|
|
|
@ -4,9 +4,6 @@ import datetime
|
|||
import pytz
|
||||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.models.script_attributes_context import (
|
||||
ScriptAttributesContext,
|
||||
)
|
||||
|
@ -17,6 +14,8 @@ from spiffworkflow_backend.services.process_instance_processor import (
|
|||
from spiffworkflow_backend.services.process_instance_service import (
|
||||
ProcessInstanceService,
|
||||
)
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
|
||||
class TestGetLocaltime(BaseTest):
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Test_acceptance_test_fixtures."""
|
||||
from flask.app import Flask
|
||||
|
||||
from spiffworkflow_backend.services.acceptance_test_fixtures import (
|
||||
load_acceptance_test_fixtures,
|
||||
)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
import pytest
|
||||
from flask import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.models.user import UserNotFoundError
|
||||
from spiffworkflow_backend.services.authorization_service import AuthorizationService
|
||||
|
@ -14,6 +12,7 @@ from spiffworkflow_backend.services.process_instance_service import (
|
|||
ProcessInstanceService,
|
||||
)
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
class TestAuthorizationService(BaseTest):
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
"""Test_various_bpmn_constructs."""
|
||||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.process_instance_processor import (
|
||||
ProcessInstanceProcessor,
|
||||
|
@ -10,6 +8,7 @@ from spiffworkflow_backend.services.process_instance_processor import (
|
|||
from spiffworkflow_backend.services.process_instance_service import (
|
||||
ProcessInstanceService,
|
||||
)
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
class TestDotNotation(BaseTest):
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
"""Test_environment_var_script."""
|
||||
from flask import Flask
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.services.process_instance_processor import (
|
||||
ProcessInstanceProcessor,
|
||||
)
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
class TestEnvironmentVarScript(BaseTest):
|
||||
|
|
|
@ -3,12 +3,11 @@ import pytest
|
|||
from flask import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from flask_bpmn.models.db import db
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.models.message_instance import MessageInstanceModel
|
||||
from spiffworkflow_backend.models.message_model import MessageModel
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
class TestMessageInstance(BaseTest):
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
"""Test_message_service."""
|
||||
from flask import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.models.message_correlation import MessageCorrelationModel
|
||||
from spiffworkflow_backend.models.message_correlation_message_instance import (
|
||||
MessageCorrelationMessageInstanceModel,
|
||||
|
@ -18,6 +15,8 @@ from spiffworkflow_backend.services.process_instance_processor import (
|
|||
from spiffworkflow_backend.services.process_instance_service import (
|
||||
ProcessInstanceService,
|
||||
)
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
|
||||
class TestMessageService(BaseTest):
|
||||
|
|
|
@ -2,12 +2,11 @@
|
|||
import pytest
|
||||
from flask.app import Flask
|
||||
from flask_bpmn.models.db import db
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.models.permission_target import (
|
||||
InvalidPermissionTargetUriError,
|
||||
)
|
||||
from spiffworkflow_backend.models.permission_target import PermissionTargetModel
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
class TestPermissionTarget(BaseTest):
|
||||
|
|
|
@ -2,15 +2,14 @@
|
|||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from flask_bpmn.models.db import db
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from spiffworkflow_backend.models.permission_assignment import PermissionAssignmentModel
|
||||
from spiffworkflow_backend.models.permission_target import PermissionTargetModel
|
||||
from spiffworkflow_backend.models.principal import PrincipalModel
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.user_service import UserService
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
|
||||
# we think we can get the list of roles for a user.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Process Model."""
|
||||
from flask.app import Flask
|
||||
|
||||
from spiffworkflow_backend.models.process_group import ProcessGroup
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
|
||||
|
|
|
@ -3,9 +3,6 @@ import pytest
|
|||
from flask import g
|
||||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.models.group import GroupModel
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceStatus
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
|
@ -19,6 +16,8 @@ from spiffworkflow_backend.services.process_instance_processor import (
|
|||
from spiffworkflow_backend.services.process_instance_service import (
|
||||
ProcessInstanceService,
|
||||
)
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
|
||||
class TestProcessInstanceProcessor(BaseTest):
|
||||
|
|
|
@ -2,12 +2,11 @@
|
|||
from typing import Optional
|
||||
|
||||
from flask.app import Flask
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||
from spiffworkflow_backend.models.process_instance_report import (
|
||||
ProcessInstanceReportModel,
|
||||
)
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
# from tests.spiffworkflow_backend.helpers.test_data import find_or_create_process_group
|
||||
# from spiffworkflow_backend.models.permission_assignment import PermissionAssignmentModel
|
||||
|
|
|
@ -3,8 +3,6 @@ from typing import Optional
|
|||
|
||||
from flask import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.models.process_instance_report import (
|
||||
ProcessInstanceReportModel,
|
||||
)
|
||||
|
@ -15,6 +13,7 @@ from spiffworkflow_backend.services.process_instance_report_service import (
|
|||
from spiffworkflow_backend.services.process_instance_report_service import (
|
||||
ProcessInstanceReportService,
|
||||
)
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
class TestProcessInstanceReportFilter(BaseTest):
|
||||
|
|
|
@ -2,15 +2,14 @@
|
|||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from flask_bpmn.models.db import db
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.models.process_model import ProcessModelInfo
|
||||
from spiffworkflow_backend.models.spec_reference import SpecReferenceCache
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.process_instance_processor import (
|
||||
ProcessInstanceProcessor,
|
||||
)
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
|
||||
class TestProcessModel(BaseTest):
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
"""Test_process_model_service."""
|
||||
from flask import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
|
||||
class TestProcessModelService(BaseTest):
|
||||
|
|
|
@ -3,13 +3,12 @@ import pytest
|
|||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from flask_bpmn.api.api_error import ApiError
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.process_instance_processor import (
|
||||
ProcessInstanceProcessor,
|
||||
)
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
|
||||
class TestOpenFile(BaseTest):
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
"""Test Permissions."""
|
||||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.process_instance_processor import (
|
||||
ProcessInstanceProcessor,
|
||||
)
|
||||
from spiffworkflow_backend.services.script_unit_test_runner import PythonScriptContext
|
||||
from spiffworkflow_backend.services.script_unit_test_runner import ScriptUnitTestRunner
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
|
||||
class TestScriptUnitTestRunner(BaseTest):
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
"""Test_various_bpmn_constructs."""
|
||||
from flask.app import Flask
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.services.secret_service import SecretService
|
||||
from spiffworkflow_backend.services.service_task_service import ServiceTaskDelegate
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
class TestServiceTaskDelegate(BaseTest):
|
||||
|
|
|
@ -6,13 +6,12 @@ from flask import Flask
|
|||
from flask.testing import FlaskClient
|
||||
from flask_bpmn.models.db import db
|
||||
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException # type: ignore
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.models.spec_reference import SpecReferenceCache
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from spiffworkflow_backend.services.spec_file_service import SpecFileService
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
|
||||
class TestSpecFileService(BaseTest):
|
||||
|
|
|
@ -3,11 +3,10 @@ from decimal import Decimal
|
|||
|
||||
from flask.app import Flask
|
||||
from flask_bpmn.models.db import db
|
||||
from spiffworkflow_backend.models.spiff_logging import SpiffLoggingModel
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||
|
||||
from spiffworkflow_backend.models.spiff_logging import SpiffLoggingModel
|
||||
|
||||
|
||||
class TestSpiffLogging(BaseTest):
|
||||
"""TestSpiffLogging."""
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
"""Test_various_bpmn_constructs."""
|
||||
from flask.app import Flask
|
||||
from flask.testing import FlaskClient
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.process_instance_processor import (
|
||||
ProcessInstanceProcessor,
|
||||
)
|
||||
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||
|
||||
|
||||
class TestVariousBpmnConstructs(BaseTest):
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"""Test cases for the __main__ module."""
|
||||
import pytest
|
||||
from click.testing import CliRunner
|
||||
|
||||
from spiffworkflow_backend import __main__
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue