Simulating a BPMN workflow
Although the FastAPI framework has no built-in utilities to support its workflows, it is flexible and fluid enough to be integrated into other workflow tools such as Camunda and Apache Airflow through extension modules, middleware, and other customizations. But this section will only focus on the raw solution of simulating BPMN workflows using Celery, which can be extended to a more flexible, real-time, and enterprise-grade approach such as Airflow integration.
Designing the BPMN workflow
The ch10-mongo
project has implemented the following BPMN workflow design using Celery:
- A sequence of service tasks that derives the percentage of the survey data result, as shown in the following diagram:
Figure 10.5 – Percentage computation workflow design
- A group of batch operations that saves data to CSV and XLSX files, as shown in the following diagram:
Figure 10.6 – Data archiving...