2022-10-12 14:22:22 +00:00
|
|
|
"""Test_various_bpmn_constructs."""
|
|
|
|
from flask.app import Flask
|
2022-11-09 20:02:19 +00:00
|
|
|
from flask.testing import FlaskClient
|
2022-10-31 13:28:03 +00:00
|
|
|
from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
|
|
|
|
2022-11-09 20:02:19 +00:00
|
|
|
from spiffworkflow_backend.models.user import UserModel
|
2022-10-12 14:22:22 +00:00
|
|
|
from spiffworkflow_backend.services.process_instance_processor import (
|
|
|
|
ProcessInstanceProcessor,
|
|
|
|
)
|
2022-11-09 20:02:19 +00:00
|
|
|
from spiffworkflow_backend.services.process_model_service import ProcessModelService
|
2022-10-12 14:22:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestVariousBpmnConstructs(BaseTest):
|
|
|
|
"""TestVariousBpmnConstructs."""
|
|
|
|
|
|
|
|
def test_running_process_with_timer_intermediate_catch_event(
|
2022-11-09 20:02:19 +00:00
|
|
|
self,
|
|
|
|
app: Flask,
|
|
|
|
client: FlaskClient,
|
|
|
|
with_db_and_bpmn_file_cleanup: None,
|
|
|
|
with_super_admin_user: UserModel,
|
2022-10-12 14:22:22 +00:00
|
|
|
) -> None:
|
|
|
|
"""Test_running_process_with_timer_intermediate_catch_event."""
|
2022-11-09 20:02:19 +00:00
|
|
|
process_model_identifier = self.basic_test_setup(
|
|
|
|
client,
|
|
|
|
with_super_admin_user,
|
|
|
|
"test_group",
|
|
|
|
"timer_intermediate_catch_event",
|
|
|
|
)
|
|
|
|
|
|
|
|
process_model = ProcessModelService().get_process_model(
|
|
|
|
process_model_id=process_model_identifier
|
2022-10-12 14:22:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
process_instance = self.create_process_instance_from_process_model(
|
|
|
|
process_model
|
|
|
|
)
|
|
|
|
processor = ProcessInstanceProcessor(process_instance)
|
|
|
|
processor.do_engine_steps(save=True)
|