Squashed 'spiffworkflow-backend/' changes from e748b1804..1e338f955

1e338f955 Another error with the error message.

git-subtree-dir: spiffworkflow-backend
git-subtree-split: 1e338f955acaf1c0c3e7d16c56c800f634638d9d
This commit is contained in:
Dan 2022-10-25 11:53:09 -04:00
parent ac929cbae7
commit eff49e1ddb
1 changed files with 2 additions and 2 deletions

View File

@ -68,13 +68,13 @@ class ProcessInstanceService:
)
processor = ProcessInstanceProcessor(process_instance)
processor.do_engine_steps(save=True)
except Exception:
except Exception as e:
db.session.rollback() # in case the above left the database with a bad transaction
process_instance.status = ProcessInstanceStatus.erroring.value
db.session.add(process_instance)
db.session.commit()
error_message = f"Error running waiting task for process_instance {process_instance.id}" + \
"({process_instance.process_model_identifier}). {str(e)}"
f"({process_instance.process_model_identifier}). {str(e)}"
current_app.logger.error(error_message)
@staticmethod