pyl passes
This commit is contained in:
parent
829eacc40d
commit
cee726e8b0
|
@ -8,8 +8,8 @@ from typing import Any
|
||||||
from flask_migrate import Migrate # type: ignore
|
from flask_migrate import Migrate # type: ignore
|
||||||
from flask_sqlalchemy import SQLAlchemy # type: ignore
|
from flask_sqlalchemy import SQLAlchemy # type: ignore
|
||||||
from sqlalchemy import event # type: ignore
|
from sqlalchemy import event # type: ignore
|
||||||
from sqlalchemy.engine.base import Connection
|
from sqlalchemy.engine.base import Connection # type: ignore
|
||||||
from sqlalchemy.orm.mapper import Mapper
|
from sqlalchemy.orm.mapper import Mapper # type: ignore
|
||||||
|
|
||||||
db = SQLAlchemy()
|
db = SQLAlchemy()
|
||||||
migrate = Migrate()
|
migrate = Migrate()
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
"""Grabs tickets from csv and makes process instances."""
|
"""Grabs tickets from csv and makes process instances."""
|
||||||
import csv
|
import csv
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
|
|
||||||
from spiffworkflow_backend import get_hacked_up_app_for_script
|
from spiffworkflow_backend import get_hacked_up_app_for_script
|
||||||
|
|
|
@ -2868,4 +2868,4 @@
|
||||||
"clientPolicies" : {
|
"clientPolicies" : {
|
||||||
"policies" : [ ]
|
"policies" : [ ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
"""Conftest."""
|
"""Conftest."""
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
from flask.testing import FlaskClient
|
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 tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||||
|
|
||||||
from spiffworkflow_backend.models.active_task_user import ActiveTaskUserModel
|
from spiffworkflow_backend.models.active_task_user import ActiveTaskUserModel
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
"""__init__."""
|
"""__init__."""
|
||||||
import os
|
import os
|
||||||
from flask_bpmn.api.api_error import api_error_blueprint
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.db import migrate
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import connexion # type: ignore
|
import connexion # type: ignore
|
||||||
|
@ -12,6 +9,9 @@ import sqlalchemy
|
||||||
from apscheduler.schedulers.background import BackgroundScheduler # type: ignore
|
from apscheduler.schedulers.background import BackgroundScheduler # type: ignore
|
||||||
from apscheduler.schedulers.base import BaseScheduler # type: ignore
|
from apscheduler.schedulers.base import BaseScheduler # type: ignore
|
||||||
from flask.json.provider import DefaultJSONProvider
|
from flask.json.provider import DefaultJSONProvider
|
||||||
|
from flask_bpmn.api.api_error import api_error_blueprint
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
|
from flask_bpmn.models.db import migrate
|
||||||
from flask_cors import CORS # type: ignore
|
from flask_cors import CORS # type: ignore
|
||||||
from flask_mail import Mail # type: ignore
|
from flask_mail import Mail # type: ignore
|
||||||
from werkzeug.exceptions import NotFound
|
from werkzeug.exceptions import NotFound
|
||||||
|
|
|
@ -8,7 +8,8 @@ GIT_COMMIT_ON_SAVE = True
|
||||||
GIT_COMMIT_USERNAME = environment_identifier_for_this_config_file_only
|
GIT_COMMIT_USERNAME = environment_identifier_for_this_config_file_only
|
||||||
GIT_COMMIT_EMAIL = f"{environment_identifier_for_this_config_file_only}@example.com"
|
GIT_COMMIT_EMAIL = f"{environment_identifier_for_this_config_file_only}@example.com"
|
||||||
SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME = environ.get(
|
SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME = environ.get(
|
||||||
"SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME", default="terraform_deployed_environment.yml"
|
"SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME",
|
||||||
|
default="terraform_deployed_environment.yml",
|
||||||
)
|
)
|
||||||
|
|
||||||
RUN_BACKGROUND_SCHEDULER = (
|
RUN_BACKGROUND_SCHEDULER = (
|
||||||
|
@ -16,6 +17,10 @@ RUN_BACKGROUND_SCHEDULER = (
|
||||||
)
|
)
|
||||||
|
|
||||||
OPEN_ID_SERVER_URL = f"https://keycloak.{environment_identifier_for_this_config_file_only}.spiffworkflow.org/realms/spiffworkflow"
|
OPEN_ID_SERVER_URL = f"https://keycloak.{environment_identifier_for_this_config_file_only}.spiffworkflow.org/realms/spiffworkflow"
|
||||||
SPIFFWORKFLOW_FRONTEND_URL = f"https://{environment_identifier_for_this_config_file_only}.spiffworkflow.org"
|
SPIFFWORKFLOW_FRONTEND_URL = (
|
||||||
SPIFFWORKFLOW_BACKEND_URL = f"https://api.{environment_identifier_for_this_config_file_only}.spiffworkflow.org"
|
f"https://{environment_identifier_for_this_config_file_only}.spiffworkflow.org"
|
||||||
|
)
|
||||||
|
SPIFFWORKFLOW_BACKEND_URL = (
|
||||||
|
f"https://api.{environment_identifier_for_this_config_file_only}.spiffworkflow.org"
|
||||||
|
)
|
||||||
CONNECTOR_PROXY_URL = f"https://connector-proxy.{environment_identifier_for_this_config_file_only}.spiffworkflow.org"
|
CONNECTOR_PROXY_URL = f"https://connector-proxy.{environment_identifier_for_this_config_file_only}.spiffworkflow.org"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""Db_helper."""
|
"""Db_helper."""
|
||||||
import time
|
import time
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
|
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
|
|
||||||
|
|
||||||
def try_to_connect(start_time: float) -> None:
|
def try_to_connect(start_time: float) -> None:
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
|
||||||
from typing import TYPE_CHECKING
|
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 import ForeignKey
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from sqlalchemy.orm import RelationshipProperty
|
from sqlalchemy.orm import RelationshipProperty
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
|
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
|
|
||||||
from spiffworkflow_backend.models.active_task import ActiveTaskModel
|
from spiffworkflow_backend.models.active_task import ActiveTaskModel
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
"""Group."""
|
"""Group."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.group import FlaskBpmnGroupModel
|
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
|
from flask_bpmn.models.group import FlaskBpmnGroupModel
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""Message_correlation."""
|
"""Message_correlation."""
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
|
||||||
from typing import TYPE_CHECKING
|
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 import ForeignKey
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""Message_correlation_message_instance."""
|
"""Message_correlation_message_instance."""
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
|
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
|
|
||||||
from spiffworkflow_backend.models.message_correlation import MessageCorrelationModel
|
from spiffworkflow_backend.models.message_correlation import MessageCorrelationModel
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""Message_correlation_property."""
|
"""Message_correlation_property."""
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
|
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
|
|
||||||
from spiffworkflow_backend.models.message_model import MessageModel
|
from spiffworkflow_backend.models.message_model import MessageModel
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
"""Message_instance."""
|
"""Message_instance."""
|
||||||
import enum
|
import enum
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from typing import TYPE_CHECKING
|
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 import ForeignKey
|
||||||
from sqlalchemy.event import listens_for
|
from sqlalchemy.event import listens_for
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""Message_correlation_property."""
|
"""Message_correlation_property."""
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
|
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
|
|
||||||
from spiffworkflow_backend.models.message_model import MessageModel
|
from spiffworkflow_backend.models.message_model import MessageModel
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""PermissionAssignment."""
|
"""PermissionAssignment."""
|
||||||
import enum
|
import enum
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
from sqlalchemy.orm import validates
|
from sqlalchemy.orm import validates
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
"""PermissionTarget."""
|
"""PermissionTarget."""
|
||||||
import re
|
import re
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
from sqlalchemy.orm import validates
|
from sqlalchemy.orm import validates
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""Principal."""
|
"""Principal."""
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
|
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from sqlalchemy.schema import CheckConstraint
|
from sqlalchemy.schema import CheckConstraint
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
"""Process_instance."""
|
"""Process_instance."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import cast
|
from typing import cast
|
||||||
|
|
||||||
import marshmallow
|
import marshmallow
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
from marshmallow import INCLUDE
|
from marshmallow import INCLUDE
|
||||||
from marshmallow import Schema
|
from marshmallow import Schema
|
||||||
from marshmallow_enum import EnumField # type: ignore
|
from marshmallow_enum import EnumField # type: ignore
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""Spiff_step_details."""
|
"""Spiff_step_details."""
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
|
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
|
|
||||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import cast
|
from typing import cast
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from typing import TypedDict
|
from typing import TypedDict
|
||||||
|
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
from sqlalchemy.orm import deferred
|
from sqlalchemy.orm import deferred
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""Refresh_token."""
|
"""Refresh_token."""
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
|
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
|
|
||||||
# from sqlalchemy.orm import relationship
|
# from sqlalchemy.orm import relationship
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""Secret_model."""
|
"""Secret_model."""
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
|
|
||||||
from marshmallow import Schema
|
from marshmallow import Schema
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""Message_model."""
|
"""Message_model."""
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
|
|
||||||
from flask_marshmallow import Schema # type: ignore
|
from flask_marshmallow import Schema # type: ignore
|
||||||
from marshmallow import INCLUDE
|
from marshmallow import INCLUDE
|
||||||
from sqlalchemy import UniqueConstraint
|
from sqlalchemy import UniqueConstraint
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
"""Spiff_logging."""
|
"""Spiff_logging."""
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""Spiff_step_details."""
|
"""Spiff_step_details."""
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
from sqlalchemy.orm import deferred
|
from sqlalchemy.orm import deferred
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
"""User."""
|
"""User."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import jwt
|
import jwt
|
||||||
import marshmallow
|
import marshmallow
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
|
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 marshmallow import Schema
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from sqlalchemy.orm import validates
|
from sqlalchemy.orm import validates
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""UserGroupAssignment."""
|
"""UserGroupAssignment."""
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
from flask_bpmn.models.db import SpiffworkflowBaseDBModel
|
||||||
|
|
||||||
from sqlalchemy import ForeignKey
|
from sqlalchemy import ForeignKey
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@ import random
|
||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
import uuid
|
import uuid
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
@ -24,6 +22,8 @@ from flask import make_response
|
||||||
from flask import redirect
|
from flask import redirect
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask.wrappers import Response
|
from flask.wrappers import Response
|
||||||
|
from flask_bpmn.api.api_error import ApiError
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
from lxml import etree # type: ignore
|
from lxml import etree # type: ignore
|
||||||
from lxml.builder import ElementMaker # type: ignore
|
from lxml.builder import ElementMaker # type: ignore
|
||||||
from SpiffWorkflow.task import Task as SpiffTask # type: ignore
|
from SpiffWorkflow.task import Task as SpiffTask # type: ignore
|
||||||
|
@ -33,7 +33,6 @@ from sqlalchemy import asc
|
||||||
from sqlalchemy import desc
|
from sqlalchemy import desc
|
||||||
from sqlalchemy import func
|
from sqlalchemy import func
|
||||||
from sqlalchemy.orm import aliased
|
from sqlalchemy.orm import aliased
|
||||||
from sqlalchemy.orm import joinedload
|
|
||||||
from sqlalchemy.orm import selectinload
|
from sqlalchemy.orm import selectinload
|
||||||
|
|
||||||
from spiffworkflow_backend.exceptions.process_entity_not_found_error import (
|
from spiffworkflow_backend.exceptions.process_entity_not_found_error import (
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import ast
|
import ast
|
||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
@ -13,6 +12,7 @@ from flask import current_app
|
||||||
from flask import g
|
from flask import g
|
||||||
from flask import redirect
|
from flask import redirect
|
||||||
from flask import request
|
from flask import request
|
||||||
|
from flask_bpmn.api.api_error import ApiError
|
||||||
from werkzeug.wrappers import Response
|
from werkzeug.wrappers import Response
|
||||||
|
|
||||||
from spiffworkflow_backend.models.user import UserModel
|
from spiffworkflow_backend.models.user import UserModel
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
"""Main."""
|
"""Main."""
|
||||||
import json
|
import json
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
|
@ -9,6 +7,8 @@ import flask.wrappers
|
||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask import Response
|
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 sqlalchemy.exc import IntegrityError
|
||||||
|
|
||||||
from spiffworkflow_backend.models.group import GroupModel
|
from spiffworkflow_backend.models.group import GroupModel
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""Get_localtime."""
|
"""Get_localtime."""
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import pytz
|
import pytz
|
||||||
|
from flask_bpmn.api.api_error import ApiError
|
||||||
|
|
||||||
from spiffworkflow_backend.models.script_attributes_context import (
|
from spiffworkflow_backend.models.script_attributes_context import (
|
||||||
ScriptAttributesContext,
|
ScriptAttributesContext,
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from spiffworkflow_backend.models.process_instance_metadata import (
|
from spiffworkflow_backend.models.process_instance_metadata import (
|
||||||
ProcessInstanceMetadataModel,
|
ProcessInstanceMetadataModel,
|
||||||
|
|
|
@ -5,10 +5,11 @@ import importlib
|
||||||
import os
|
import os
|
||||||
import pkgutil
|
import pkgutil
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
|
|
||||||
|
from flask_bpmn.api.api_error import ApiError
|
||||||
|
|
||||||
from spiffworkflow_backend.models.script_attributes_context import (
|
from spiffworkflow_backend.models.script_attributes_context import (
|
||||||
ScriptAttributesContext,
|
ScriptAttributesContext,
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""Acceptance_test_fixtures."""
|
"""Acceptance_test_fixtures."""
|
||||||
import time
|
import time
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
|
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||||
|
|
||||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||||
|
|
|
@ -3,14 +3,14 @@ import base64
|
||||||
import enum
|
import enum
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import jwt
|
import jwt
|
||||||
import requests
|
import requests
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
from flask import redirect
|
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 werkzeug.wrappers import Response
|
||||||
|
|
||||||
from spiffworkflow_backend.models.refresh_token import RefreshTokenModel
|
from spiffworkflow_backend.models.refresh_token import RefreshTokenModel
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
"""Authorization_service."""
|
"""Authorization_service."""
|
||||||
import inspect
|
import inspect
|
||||||
import re
|
import re
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
|
@ -12,6 +10,8 @@ from flask import current_app
|
||||||
from flask import g
|
from flask import g
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask import scaffold
|
from flask import scaffold
|
||||||
|
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.task import Task as SpiffTask # type: ignore
|
||||||
from sqlalchemy import or_
|
from sqlalchemy import or_
|
||||||
from sqlalchemy import text
|
from sqlalchemy import text
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""Data_setup_service."""
|
"""Data_setup_service."""
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
|
|
||||||
from flask import current_app
|
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.process_model_service import ProcessModelService
|
||||||
from spiffworkflow_backend.services.spec_file_service import SpecFileService
|
from spiffworkflow_backend.services.spec_file_service import SpecFileService
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
"""Error_handling_service."""
|
"""Error_handling_service."""
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import List
|
from typing import List
|
||||||
from typing import Union
|
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 ProcessInstanceModel
|
||||||
from spiffworkflow_backend.models.process_instance import ProcessInstanceStatus
|
from spiffworkflow_backend.models.process_instance import ProcessInstanceStatus
|
||||||
from spiffworkflow_backend.services.email_service import EmailService
|
from spiffworkflow_backend.services.email_service import EmailService
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
"""File_system_service."""
|
"""File_system_service."""
|
||||||
import os
|
import os
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from typing import List
|
from typing import List
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import pytz
|
import pytz
|
||||||
from flask import current_app
|
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 CONTENT_TYPES
|
||||||
from spiffworkflow_backend.models.file import File
|
from spiffworkflow_backend.models.file import File
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
"""Group_service."""
|
"""Group_service."""
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
|
|
||||||
from spiffworkflow_backend.models.group import GroupModel
|
from spiffworkflow_backend.models.group import GroupModel
|
||||||
from spiffworkflow_backend.services.user_service import UserService
|
from spiffworkflow_backend.services.user_service import UserService
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from flask import g
|
from flask import g
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
|
|
||||||
from spiffworkflow_backend.models.spiff_logging import SpiffLoggingModel
|
from spiffworkflow_backend.models.spiff_logging import SpiffLoggingModel
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""Message_service."""
|
"""Message_service."""
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
from sqlalchemy import and_
|
from sqlalchemy import and_
|
||||||
from sqlalchemy import or_
|
from sqlalchemy import or_
|
||||||
from sqlalchemy import select
|
from sqlalchemy import select
|
||||||
|
|
|
@ -8,8 +8,6 @@ import re
|
||||||
import time
|
import time
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
@ -23,6 +21,8 @@ from typing import Union
|
||||||
import dateparser
|
import dateparser
|
||||||
import pytz
|
import pytz
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
|
from flask_bpmn.api.api_error import ApiError
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
from lxml import etree # type: ignore
|
from lxml import etree # type: ignore
|
||||||
from RestrictedPython import safe_globals # type: ignore
|
from RestrictedPython import safe_globals # type: ignore
|
||||||
from SpiffWorkflow.bpmn.exceptions import WorkflowTaskExecException # type: ignore
|
from SpiffWorkflow.bpmn.exceptions import WorkflowTaskExecException # type: ignore
|
||||||
|
@ -192,11 +192,11 @@ class CustomBpmnScriptEngine(PythonScriptEngine): # type: ignore
|
||||||
return self._evaluate(expression, task.data, task, external_methods)
|
return self._evaluate(expression, task.data, task, external_methods)
|
||||||
|
|
||||||
def _evaluate(
|
def _evaluate(
|
||||||
self,
|
self,
|
||||||
expression: str,
|
expression: str,
|
||||||
context: Dict[str, Union[Box, str]],
|
context: Dict[str, Union[Box, str]],
|
||||||
task: Optional[SpiffTask] = None,
|
task: Optional[SpiffTask] = None,
|
||||||
external_methods: Optional[Dict[str, Any]] = None,
|
external_methods: Optional[Dict[str, Any]] = None,
|
||||||
) -> Any:
|
) -> Any:
|
||||||
"""_evaluate."""
|
"""_evaluate."""
|
||||||
methods = self.__get_augment_methods(task)
|
methods = self.__get_augment_methods(task)
|
||||||
|
@ -220,7 +220,7 @@ class CustomBpmnScriptEngine(PythonScriptEngine): # type: ignore
|
||||||
) from exception
|
) from exception
|
||||||
|
|
||||||
def execute(
|
def execute(
|
||||||
self, task: SpiffTask, script: str, external_methods: Any = None
|
self, task: SpiffTask, script: str, external_methods: Any = None
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Execute."""
|
"""Execute."""
|
||||||
try:
|
try:
|
||||||
|
@ -234,10 +234,10 @@ class CustomBpmnScriptEngine(PythonScriptEngine): # type: ignore
|
||||||
raise WorkflowTaskExecException(task, f" {script}, {e}", e) from e
|
raise WorkflowTaskExecException(task, f" {script}, {e}", e) from e
|
||||||
|
|
||||||
def call_service(
|
def call_service(
|
||||||
self,
|
self,
|
||||||
operation_name: str,
|
operation_name: str,
|
||||||
operation_params: Dict[str, Any],
|
operation_params: Dict[str, Any],
|
||||||
task_data: Dict[str, Any],
|
task_data: Dict[str, Any],
|
||||||
) -> Any:
|
) -> Any:
|
||||||
"""CallService."""
|
"""CallService."""
|
||||||
return ServiceTaskDelegate.call_connector(
|
return ServiceTaskDelegate.call_connector(
|
||||||
|
@ -284,7 +284,7 @@ class ProcessInstanceProcessor:
|
||||||
# * get_spec, which returns a spec and any subprocesses (as IdToBpmnProcessSpecMapping dict)
|
# * get_spec, which returns a spec and any subprocesses (as IdToBpmnProcessSpecMapping dict)
|
||||||
# * __get_bpmn_process_instance, which takes spec and subprocesses and instantiates and returns a BpmnWorkflow
|
# * __get_bpmn_process_instance, which takes spec and subprocesses and instantiates and returns a BpmnWorkflow
|
||||||
def __init__(
|
def __init__(
|
||||||
self, process_instance_model: ProcessInstanceModel, validate_only: bool = False
|
self, process_instance_model: ProcessInstanceModel, validate_only: bool = False
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Create a Workflow Processor based on the serialized information available in the process_instance model."""
|
"""Create a Workflow Processor based on the serialized information available in the process_instance model."""
|
||||||
tld = current_app.config["THREAD_LOCAL_DATA"]
|
tld = current_app.config["THREAD_LOCAL_DATA"]
|
||||||
|
@ -311,7 +311,7 @@ class ProcessInstanceProcessor:
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
bpmn_json_length = len(process_instance_model.bpmn_json.encode("utf-8"))
|
bpmn_json_length = len(process_instance_model.bpmn_json.encode("utf-8"))
|
||||||
megabyte = float(1024 ** 2)
|
megabyte = float(1024**2)
|
||||||
json_size = bpmn_json_length / megabyte
|
json_size = bpmn_json_length / megabyte
|
||||||
if json_size > 1:
|
if json_size > 1:
|
||||||
wf_json = json.loads(process_instance_model.bpmn_json)
|
wf_json = json.loads(process_instance_model.bpmn_json)
|
||||||
|
@ -325,22 +325,22 @@ class ProcessInstanceProcessor:
|
||||||
len(json.dumps(test_spec).encode("utf-8")) / megabyte
|
len(json.dumps(test_spec).encode("utf-8")) / megabyte
|
||||||
)
|
)
|
||||||
message = (
|
message = (
|
||||||
"Workflow "
|
"Workflow "
|
||||||
+ process_instance_model.process_model_identifier
|
+ process_instance_model.process_model_identifier
|
||||||
+ f" JSON Size is over 1MB:{json_size:.2f} MB"
|
+ f" JSON Size is over 1MB:{json_size:.2f} MB"
|
||||||
)
|
)
|
||||||
message += f"\n Task Size: {task_size}"
|
message += f"\n Task Size: {task_size}"
|
||||||
message += f"\n Spec Size: {spec_size}"
|
message += f"\n Spec Size: {spec_size}"
|
||||||
current_app.logger.warning(message)
|
current_app.logger.warning(message)
|
||||||
|
|
||||||
def check_sub_specs(
|
def check_sub_specs(
|
||||||
test_spec: dict, indent: int = 0, show_all: bool = False
|
test_spec: dict, indent: int = 0, show_all: bool = False
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Check_sub_specs."""
|
"""Check_sub_specs."""
|
||||||
for my_spec_name in test_spec["task_specs"]:
|
for my_spec_name in test_spec["task_specs"]:
|
||||||
my_spec = test_spec["task_specs"][my_spec_name]
|
my_spec = test_spec["task_specs"][my_spec_name]
|
||||||
my_spec_size = (
|
my_spec_size = (
|
||||||
len(json.dumps(my_spec).encode("utf-8")) / megabyte
|
len(json.dumps(my_spec).encode("utf-8")) / megabyte
|
||||||
)
|
)
|
||||||
if my_spec_size > 0.1 or show_all:
|
if my_spec_size > 0.1 or show_all:
|
||||||
current_app.logger.warning(
|
current_app.logger.warning(
|
||||||
|
@ -376,13 +376,13 @@ class ProcessInstanceProcessor:
|
||||||
raise ApiError(
|
raise ApiError(
|
||||||
error_code="unexpected_process_instance_structure",
|
error_code="unexpected_process_instance_structure",
|
||||||
message="Failed to deserialize process_instance"
|
message="Failed to deserialize process_instance"
|
||||||
" '%s' due to a mis-placed or missing task '%s'"
|
" '%s' due to a mis-placed or missing task '%s'"
|
||||||
% (self.process_model_identifier, str(ke)),
|
% (self.process_model_identifier, str(ke)),
|
||||||
) from ke
|
) from ke
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_process_model_and_subprocesses(
|
def get_process_model_and_subprocesses(
|
||||||
cls, process_model_identifier: str
|
cls, process_model_identifier: str
|
||||||
) -> Tuple[BpmnProcessSpec, IdToBpmnProcessSpecMapping]:
|
) -> Tuple[BpmnProcessSpec, IdToBpmnProcessSpecMapping]:
|
||||||
"""Get_process_model_and_subprocesses."""
|
"""Get_process_model_and_subprocesses."""
|
||||||
process_model_info = ProcessModelService.get_process_model(
|
process_model_info = ProcessModelService.get_process_model(
|
||||||
|
@ -400,7 +400,7 @@ class ProcessInstanceProcessor:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_bpmn_process_instance_from_process_model(
|
def get_bpmn_process_instance_from_process_model(
|
||||||
cls, process_model_identifier: str
|
cls, process_model_identifier: str
|
||||||
) -> BpmnWorkflow:
|
) -> BpmnWorkflow:
|
||||||
"""Get_all_bpmn_process_identifiers_for_process_model."""
|
"""Get_all_bpmn_process_identifiers_for_process_model."""
|
||||||
(bpmn_process_spec, subprocesses) = cls.get_process_model_and_subprocesses(
|
(bpmn_process_spec, subprocesses) = cls.get_process_model_and_subprocesses(
|
||||||
|
@ -425,7 +425,7 @@ class ProcessInstanceProcessor:
|
||||||
return current_user
|
return current_user
|
||||||
|
|
||||||
def add_user_info_to_process_instance(
|
def add_user_info_to_process_instance(
|
||||||
self, bpmn_process_instance: BpmnWorkflow
|
self, bpmn_process_instance: BpmnWorkflow
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Add_user_info_to_process_instance."""
|
"""Add_user_info_to_process_instance."""
|
||||||
current_user = self.current_user()
|
current_user = self.current_user()
|
||||||
|
@ -438,8 +438,8 @@ class ProcessInstanceProcessor:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_bpmn_process_instance_from_workflow_spec(
|
def get_bpmn_process_instance_from_workflow_spec(
|
||||||
spec: BpmnProcessSpec,
|
spec: BpmnProcessSpec,
|
||||||
subprocesses: Optional[IdToBpmnProcessSpecMapping] = None,
|
subprocesses: Optional[IdToBpmnProcessSpecMapping] = None,
|
||||||
) -> BpmnWorkflow:
|
) -> BpmnWorkflow:
|
||||||
"""Get_bpmn_process_instance_from_workflow_spec."""
|
"""Get_bpmn_process_instance_from_workflow_spec."""
|
||||||
return BpmnWorkflow(
|
return BpmnWorkflow(
|
||||||
|
@ -450,10 +450,10 @@ class ProcessInstanceProcessor:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __get_bpmn_process_instance(
|
def __get_bpmn_process_instance(
|
||||||
process_instance_model: ProcessInstanceModel,
|
process_instance_model: ProcessInstanceModel,
|
||||||
spec: Optional[BpmnProcessSpec] = None,
|
spec: Optional[BpmnProcessSpec] = None,
|
||||||
validate_only: bool = False,
|
validate_only: bool = False,
|
||||||
subprocesses: Optional[IdToBpmnProcessSpecMapping] = None,
|
subprocesses: Optional[IdToBpmnProcessSpecMapping] = None,
|
||||||
) -> BpmnWorkflow:
|
) -> BpmnWorkflow:
|
||||||
"""__get_bpmn_process_instance."""
|
"""__get_bpmn_process_instance."""
|
||||||
if process_instance_model.bpmn_json:
|
if process_instance_model.bpmn_json:
|
||||||
|
@ -496,14 +496,14 @@ class ProcessInstanceProcessor:
|
||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
def raise_if_no_potential_owners(
|
def raise_if_no_potential_owners(
|
||||||
self, potential_owner_ids: list[int], message: str
|
self, potential_owner_ids: list[int], message: str
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Raise_if_no_potential_owners."""
|
"""Raise_if_no_potential_owners."""
|
||||||
if not potential_owner_ids:
|
if not potential_owner_ids:
|
||||||
raise (NoPotentialOwnersForTaskError(message))
|
raise (NoPotentialOwnersForTaskError(message))
|
||||||
|
|
||||||
def get_potential_owner_ids_from_task(
|
def get_potential_owner_ids_from_task(
|
||||||
self, task: SpiffTask
|
self, task: SpiffTask
|
||||||
) -> PotentialOwnerIdList:
|
) -> PotentialOwnerIdList:
|
||||||
"""Get_potential_owner_ids_from_task."""
|
"""Get_potential_owner_ids_from_task."""
|
||||||
task_spec = task.task_spec
|
task_spec = task.task_spec
|
||||||
|
@ -598,7 +598,7 @@ class ProcessInstanceProcessor:
|
||||||
if path_segment in data_for_key:
|
if path_segment in data_for_key:
|
||||||
data_for_key = data_for_key[path_segment]
|
data_for_key = data_for_key[path_segment]
|
||||||
else:
|
else:
|
||||||
data_for_key = None
|
data_for_key = None # type: ignore
|
||||||
break
|
break
|
||||||
|
|
||||||
if data_for_key is not None:
|
if data_for_key is not None:
|
||||||
|
@ -712,7 +712,7 @@ class ProcessInstanceProcessor:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def backfill_missing_spec_reference_records(
|
def backfill_missing_spec_reference_records(
|
||||||
bpmn_process_identifier: str,
|
bpmn_process_identifier: str,
|
||||||
) -> Optional[str]:
|
) -> Optional[str]:
|
||||||
"""Backfill_missing_spec_reference_records."""
|
"""Backfill_missing_spec_reference_records."""
|
||||||
process_models = ProcessModelService.get_process_models(recursive=True)
|
process_models = ProcessModelService.get_process_models(recursive=True)
|
||||||
|
@ -733,7 +733,7 @@ class ProcessInstanceProcessor:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def bpmn_file_full_path_from_bpmn_process_identifier(
|
def bpmn_file_full_path_from_bpmn_process_identifier(
|
||||||
bpmn_process_identifier: str,
|
bpmn_process_identifier: str,
|
||||||
) -> str:
|
) -> str:
|
||||||
"""Bpmn_file_full_path_from_bpmn_process_identifier."""
|
"""Bpmn_file_full_path_from_bpmn_process_identifier."""
|
||||||
if bpmn_process_identifier is None:
|
if bpmn_process_identifier is None:
|
||||||
|
@ -743,8 +743,8 @@ class ProcessInstanceProcessor:
|
||||||
|
|
||||||
spec_reference = (
|
spec_reference = (
|
||||||
SpecReferenceCache.query.filter_by(identifier=bpmn_process_identifier)
|
SpecReferenceCache.query.filter_by(identifier=bpmn_process_identifier)
|
||||||
.filter_by(type="process")
|
.filter_by(type="process")
|
||||||
.first()
|
.first()
|
||||||
)
|
)
|
||||||
bpmn_file_full_path = None
|
bpmn_file_full_path = None
|
||||||
if spec_reference is None:
|
if spec_reference is None:
|
||||||
|
@ -763,15 +763,15 @@ class ProcessInstanceProcessor:
|
||||||
ApiError(
|
ApiError(
|
||||||
error_code="could_not_find_bpmn_process_identifier",
|
error_code="could_not_find_bpmn_process_identifier",
|
||||||
message="Could not find the the given bpmn process identifier from any sources: %s"
|
message="Could not find the the given bpmn process identifier from any sources: %s"
|
||||||
% bpmn_process_identifier,
|
% bpmn_process_identifier,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return os.path.abspath(bpmn_file_full_path)
|
return os.path.abspath(bpmn_file_full_path)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def update_spiff_parser_with_all_process_dependency_files(
|
def update_spiff_parser_with_all_process_dependency_files(
|
||||||
parser: BpmnDmnParser,
|
parser: BpmnDmnParser,
|
||||||
processed_identifiers: Optional[set[str]] = None,
|
processed_identifiers: Optional[set[str]] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Update_spiff_parser_with_all_process_dependency_files."""
|
"""Update_spiff_parser_with_all_process_dependency_files."""
|
||||||
if processed_identifiers is None:
|
if processed_identifiers is None:
|
||||||
|
@ -809,7 +809,7 @@ class ProcessInstanceProcessor:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_spec(
|
def get_spec(
|
||||||
files: List[File], process_model_info: ProcessModelInfo
|
files: List[File], process_model_info: ProcessModelInfo
|
||||||
) -> Tuple[BpmnProcessSpec, IdToBpmnProcessSpecMapping]:
|
) -> Tuple[BpmnProcessSpec, IdToBpmnProcessSpecMapping]:
|
||||||
"""Returns a SpiffWorkflow specification for the given process_instance spec, using the files provided."""
|
"""Returns a SpiffWorkflow specification for the given process_instance spec, using the files provided."""
|
||||||
parser = ProcessInstanceProcessor.get_parser()
|
parser = ProcessInstanceProcessor.get_parser()
|
||||||
|
@ -823,14 +823,14 @@ class ProcessInstanceProcessor:
|
||||||
dmn: etree.Element = etree.fromstring(data)
|
dmn: etree.Element = etree.fromstring(data)
|
||||||
parser.add_dmn_xml(dmn, filename=file.name)
|
parser.add_dmn_xml(dmn, filename=file.name)
|
||||||
if (
|
if (
|
||||||
process_model_info.primary_process_id is None
|
process_model_info.primary_process_id is None
|
||||||
or process_model_info.primary_process_id == ""
|
or process_model_info.primary_process_id == ""
|
||||||
):
|
):
|
||||||
raise (
|
raise (
|
||||||
ApiError(
|
ApiError(
|
||||||
error_code="no_primary_bpmn_error",
|
error_code="no_primary_bpmn_error",
|
||||||
message="There is no primary BPMN process id defined for process_model %s"
|
message="There is no primary BPMN process id defined for process_model %s"
|
||||||
% process_model_info.id,
|
% process_model_info.id,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
ProcessInstanceProcessor.update_spiff_parser_with_all_process_dependency_files(
|
ProcessInstanceProcessor.update_spiff_parser_with_all_process_dependency_files(
|
||||||
|
@ -848,7 +848,7 @@ class ProcessInstanceProcessor:
|
||||||
raise ApiError(
|
raise ApiError(
|
||||||
error_code="process_instance_validation_error",
|
error_code="process_instance_validation_error",
|
||||||
message="Failed to parse the Workflow Specification. "
|
message="Failed to parse the Workflow Specification. "
|
||||||
+ "Error is '%s.'" % str(ve),
|
+ "Error is '%s.'" % str(ve),
|
||||||
file_name=ve.filename,
|
file_name=ve.filename,
|
||||||
task_id=ve.id,
|
task_id=ve.id,
|
||||||
tag=ve.tag,
|
tag=ve.tag,
|
||||||
|
@ -895,12 +895,12 @@ class ProcessInstanceProcessor:
|
||||||
|
|
||||||
message_correlations = []
|
message_correlations = []
|
||||||
for (
|
for (
|
||||||
message_correlation_key,
|
message_correlation_key,
|
||||||
message_correlation_properties,
|
message_correlation_properties,
|
||||||
) in bpmn_message.correlations.items():
|
) in bpmn_message.correlations.items():
|
||||||
for (
|
for (
|
||||||
message_correlation_property_identifier,
|
message_correlation_property_identifier,
|
||||||
message_correlation_property_value,
|
message_correlation_property_value,
|
||||||
) in message_correlation_properties.items():
|
) in message_correlation_properties.items():
|
||||||
message_correlation_property = (
|
message_correlation_property = (
|
||||||
MessageCorrelationPropertyModel.query.filter_by(
|
MessageCorrelationPropertyModel.query.filter_by(
|
||||||
|
@ -992,7 +992,7 @@ class ProcessInstanceProcessor:
|
||||||
db.session.add(message_instance)
|
db.session.add(message_instance)
|
||||||
|
|
||||||
for (
|
for (
|
||||||
spiff_correlation_property
|
spiff_correlation_property
|
||||||
) in waiting_task.task_spec.event_definition.correlation_properties:
|
) in waiting_task.task_spec.event_definition.correlation_properties:
|
||||||
# NOTE: we may have to cycle through keys here
|
# NOTE: we may have to cycle through keys here
|
||||||
# not sure yet if it's valid for a property to be associated with multiple keys
|
# not sure yet if it's valid for a property to be associated with multiple keys
|
||||||
|
@ -1002,9 +1002,9 @@ class ProcessInstanceProcessor:
|
||||||
process_instance_id=self.process_instance_model.id,
|
process_instance_id=self.process_instance_model.id,
|
||||||
name=correlation_key_name,
|
name=correlation_key_name,
|
||||||
)
|
)
|
||||||
.join(MessageCorrelationPropertyModel)
|
.join(MessageCorrelationPropertyModel)
|
||||||
.filter_by(identifier=spiff_correlation_property.name)
|
.filter_by(identifier=spiff_correlation_property.name)
|
||||||
.first()
|
.first()
|
||||||
)
|
)
|
||||||
message_correlation_message_instance = (
|
message_correlation_message_instance = (
|
||||||
MessageCorrelationMessageInstanceModel(
|
MessageCorrelationMessageInstanceModel(
|
||||||
|
@ -1108,12 +1108,12 @@ class ProcessInstanceProcessor:
|
||||||
endtasks = []
|
endtasks = []
|
||||||
if self.bpmn_process_instance.is_completed():
|
if self.bpmn_process_instance.is_completed():
|
||||||
for task in SpiffTask.Iterator(
|
for task in SpiffTask.Iterator(
|
||||||
self.bpmn_process_instance.task_tree, TaskState.ANY_MASK
|
self.bpmn_process_instance.task_tree, TaskState.ANY_MASK
|
||||||
):
|
):
|
||||||
# Assure that we find the end event for this process_instance, and not for any sub-process_instances.
|
# Assure that we find the end event for this process_instance, and not for any sub-process_instances.
|
||||||
if (
|
if (
|
||||||
isinstance(task.task_spec, EndEvent)
|
isinstance(task.task_spec, EndEvent)
|
||||||
and task.workflow == self.bpmn_process_instance
|
and task.workflow == self.bpmn_process_instance
|
||||||
):
|
):
|
||||||
endtasks.append(task)
|
endtasks.append(task)
|
||||||
if len(endtasks) > 0:
|
if len(endtasks) > 0:
|
||||||
|
@ -1149,8 +1149,8 @@ class ProcessInstanceProcessor:
|
||||||
return task
|
return task
|
||||||
for task in ready_tasks:
|
for task in ready_tasks:
|
||||||
if (
|
if (
|
||||||
self.bpmn_process_instance.last_task
|
self.bpmn_process_instance.last_task
|
||||||
and task.parent == last_user_task.parent
|
and task.parent == last_user_task.parent
|
||||||
):
|
):
|
||||||
return task
|
return task
|
||||||
|
|
||||||
|
@ -1160,7 +1160,7 @@ class ProcessInstanceProcessor:
|
||||||
# and return that
|
# and return that
|
||||||
next_task = None
|
next_task = None
|
||||||
for task in SpiffTask.Iterator(
|
for task in SpiffTask.Iterator(
|
||||||
self.bpmn_process_instance.task_tree, TaskState.NOT_FINISHED_MASK
|
self.bpmn_process_instance.task_tree, TaskState.NOT_FINISHED_MASK
|
||||||
):
|
):
|
||||||
next_task = task
|
next_task = task
|
||||||
return next_task
|
return next_task
|
||||||
|
@ -1244,7 +1244,7 @@ class ProcessInstanceProcessor:
|
||||||
t
|
t
|
||||||
for t in all_tasks
|
for t in all_tasks
|
||||||
if not self.bpmn_process_instance._is_engine_task(t.task_spec)
|
if not self.bpmn_process_instance._is_engine_task(t.task_spec)
|
||||||
and t.state in [TaskState.COMPLETED, TaskState.CANCELLED]
|
and t.state in [TaskState.COMPLETED, TaskState.CANCELLED]
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_all_waiting_tasks(self) -> list[SpiffTask]:
|
def get_all_waiting_tasks(self) -> list[SpiffTask]:
|
||||||
|
@ -1259,7 +1259,7 @@ class ProcessInstanceProcessor:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_task_by_bpmn_identifier(
|
def get_task_by_bpmn_identifier(
|
||||||
cls, bpmn_task_identifier: str, bpmn_process_instance: BpmnWorkflow
|
cls, bpmn_task_identifier: str, bpmn_process_instance: BpmnWorkflow
|
||||||
) -> Optional[SpiffTask]:
|
) -> Optional[SpiffTask]:
|
||||||
"""Get_task_by_id."""
|
"""Get_task_by_id."""
|
||||||
all_tasks = bpmn_process_instance.get_tasks(TaskState.ANY_MASK)
|
all_tasks = bpmn_process_instance.get_tasks(TaskState.ANY_MASK)
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
"""Process_instance_service."""
|
"""Process_instance_service."""
|
||||||
import time
|
import time
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from flask import current_app
|
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.task import Task as SpiffTask # type: ignore
|
||||||
|
|
||||||
from spiffworkflow_backend.models.active_task import ActiveTaskModel
|
from spiffworkflow_backend.models.active_task import ActiveTaskModel
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import List
|
from typing import List
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from typing import TypeVar
|
from typing import TypeVar
|
||||||
|
|
||||||
|
from flask_bpmn.api.api_error import ApiError
|
||||||
|
|
||||||
from spiffworkflow_backend.exceptions.process_entity_not_found_error import (
|
from spiffworkflow_backend.exceptions.process_entity_not_found_error import (
|
||||||
ProcessEntityNotFoundError,
|
ProcessEntityNotFoundError,
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
"""Secret_service."""
|
"""Secret_service."""
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from flask_bpmn.api.api_error import ApiError
|
from flask_bpmn.api.api_error import ApiError
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
from spiffworkflow_backend.models.secret_model import SecretModel
|
from spiffworkflow_backend.models.secret_model import SecretModel
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import List
|
from typing import List
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException # type: ignore
|
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException # type: ignore
|
||||||
|
|
||||||
from spiffworkflow_backend.models.file import File
|
from spiffworkflow_backend.models.file import File
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
"""User_service."""
|
"""User_service."""
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
from flask import g
|
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 import ActiveTaskModel
|
||||||
from spiffworkflow_backend.models.active_task_user import ActiveTaskUserModel
|
from spiffworkflow_backend.models.active_task_user import ActiveTaskUserModel
|
||||||
|
|
|
@ -3,14 +3,14 @@ import io
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
from flask.testing import FlaskClient
|
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 tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||||
from werkzeug.test import TestResponse # type: ignore
|
from werkzeug.test import TestResponse # type: ignore
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,12 @@ import io
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
from flask.testing import FlaskClient
|
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.base_test import BaseTest
|
||||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
"""Test_secret_service."""
|
"""Test_secret_service."""
|
||||||
import json
|
import json
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
from flask.testing import FlaskClient
|
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.base_test import BaseTest
|
||||||
from werkzeug.test import TestResponse # type: ignore
|
from werkzeug.test import TestResponse # type: ignore
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
"""Test_get_localtime."""
|
"""Test_get_localtime."""
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
|
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
from flask.testing import FlaskClient
|
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.base_test import BaseTest
|
||||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
"""Test_message_instance."""
|
"""Test_message_instance."""
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask.testing import FlaskClient
|
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.base_test import BaseTest
|
||||||
|
|
||||||
from spiffworkflow_backend.models.message_instance import MessageInstanceModel
|
from spiffworkflow_backend.models.message_instance import MessageInstanceModel
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
"""Process Model."""
|
"""Process Model."""
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||||
|
|
||||||
from spiffworkflow_backend.models.permission_target import (
|
from spiffworkflow_backend.models.permission_target import (
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
"""Test Permissions."""
|
"""Test Permissions."""
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
|
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
from flask.testing import FlaskClient
|
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.base_test import BaseTest
|
||||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
"""Process Model."""
|
"""Process Model."""
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
|
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
from flask.testing import FlaskClient
|
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.base_test import BaseTest
|
||||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
"""Test_various_bpmn_constructs."""
|
"""Test_various_bpmn_constructs."""
|
||||||
from flask_bpmn.api.api_error import ApiError
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
from flask.testing import FlaskClient
|
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.base_test import BaseTest
|
||||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
"""Test_message_service."""
|
"""Test_message_service."""
|
||||||
import os
|
import os
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask.testing import FlaskClient
|
from flask.testing import FlaskClient
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException # type: ignore
|
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException # type: ignore
|
||||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""Process Model."""
|
"""Process Model."""
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from flask_bpmn.models.db import db
|
|
||||||
|
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
|
from flask_bpmn.models.db import db
|
||||||
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
||||||
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
from tests.spiffworkflow_backend.helpers.test_data import load_test_spec
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue