2022-10-12 14:22:22 +00:00
|
|
|
"""Grabs tickets from csv and makes process instances."""
|
2024-03-27 18:05:49 +00:00
|
|
|
|
2022-10-12 14:22:22 +00:00
|
|
|
import os
|
|
|
|
|
2022-12-08 21:39:23 +00:00
|
|
|
from spiffworkflow_backend import create_app
|
2022-10-12 19:28:52 +00:00
|
|
|
from spiffworkflow_backend.services.data_setup_service import DataSetupService
|
2022-10-12 14:22:22 +00:00
|
|
|
|
|
|
|
|
2022-10-12 19:28:52 +00:00
|
|
|
def main() -> None:
|
2022-12-08 21:39:23 +00:00
|
|
|
app = create_app()
|
2022-10-12 14:22:22 +00:00
|
|
|
with app.app_context():
|
2022-10-12 19:28:52 +00:00
|
|
|
failing_process_models = DataSetupService.save_all_process_models()
|
2022-10-12 14:22:22 +00:00
|
|
|
for bpmn_errors in failing_process_models:
|
|
|
|
print(bpmn_errors)
|
2023-12-05 16:41:59 +00:00
|
|
|
if os.environ.get("SPIFFWORKFLOW_BACKEND_FAIL_ON_INVALID_PROCESS_MODELS") != "false" and len(failing_process_models) > 0:
|
2022-10-12 14:22:22 +00:00
|
|
|
exit(1)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|