2022-09-16 21:04:45 +00:00
|
|
|
"""Grabs tickets from csv and makes process instances."""
|
2022-10-12 16:34:24 +00:00
|
|
|
from spiffworkflow_backend import get_hacked_up_app_for_script
|
2022-10-12 17:09:13 +00:00
|
|
|
from spiffworkflow_backend.services.data_setup_service import DataSetupService
|
2022-09-16 21:04:45 +00:00
|
|
|
|
2022-09-16 22:41:39 +00:00
|
|
|
|
2022-10-12 17:09:13 +00:00
|
|
|
def main() -> None:
|
2022-09-16 21:04:45 +00:00
|
|
|
"""Main."""
|
2022-10-12 16:34:24 +00:00
|
|
|
app = get_hacked_up_app_for_script()
|
2022-09-16 21:04:45 +00:00
|
|
|
with app.app_context():
|
2022-10-12 17:09:13 +00:00
|
|
|
failing_process_models = DataSetupService.save_all()
|
2022-09-28 19:33:12 +00:00
|
|
|
for bpmn_errors in failing_process_models:
|
|
|
|
print(bpmn_errors)
|
|
|
|
if len(failing_process_models) > 0:
|
|
|
|
exit(1)
|
2022-09-16 21:04:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|