From 9781908243408ed221f2b0131a00b8a9612f81f3 Mon Sep 17 00:00:00 2001 From: burnettk Date: Wed, 19 Oct 2022 10:31:35 -0400 Subject: [PATCH] Squashed 'spiffworkflow-backend/' changes from d0336039c..57ba8e0c8 57ba8e0c8 also set up the config for hacked app w/ burnettk 045fe9c93 configure sentry in hacked up app w/ burnettk fd1a273d3 save process instance even it fails w/ burnettk git-subtree-dir: spiffworkflow-backend git-subtree-split: 57ba8e0c8205cb049d3f93c21f73be96232dda93 --- src/spiffworkflow_backend/__init__.py | 2 ++ .../services/process_instance_processor.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/spiffworkflow_backend/__init__.py b/src/spiffworkflow_backend/__init__.py index 0336476e..fa00e10e 100644 --- a/src/spiffworkflow_backend/__init__.py +++ b/src/spiffworkflow_backend/__init__.py @@ -132,6 +132,8 @@ def get_hacked_up_app_for_script() -> flask.app.Flask: else: raise Exception(f"Could not find {full_process_model_path}") app = create_app() + setup_config(app) + configure_sentry(app) return app diff --git a/src/spiffworkflow_backend/services/process_instance_processor.py b/src/spiffworkflow_backend/services/process_instance_processor.py index eac605ce..435b7901 100644 --- a/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/src/spiffworkflow_backend/services/process_instance_processor.py @@ -895,6 +895,10 @@ class ProcessInstanceProcessor: except WorkflowTaskExecException as we: raise ApiError.from_workflow_exception("task_error", str(we), we) from we + finally: + if save: + self.save() + def cancel_notify(self) -> None: """Cancel_notify.""" self.__cancel_notify(self.bpmn_process_instance)