# fastapi-bpmn-engine **Repository Path**: shifeipython/fastapi-bpmn-engine ## Basic Information - **Project Name**: fastapi-bpmn-engine - **Description**: No description available - **Primary Language**: Python - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-01-09 - **Last Updated**: 2025-01-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 基于fastapi和tortoise-orm的bpmn工作流引擎 基于 https://github.com/ntankovic/python-bpmn-engine ,正在给他重构。 ## bpmn文件可以去找个开源的在线画图工具: ![image](https://user-images.githubusercontent.com/714889/114159824-81c65d80-9926-11eb-8b74-6d5dd9bb82ea.png) > 项目已经跑起来了,但是感觉还没倒能用的程度,主要问题是他用了asyncio.Queue,而python经常通过gunicorn启很多worker,感觉可能会出问题,准备给他拆了。 > 在就是代码 > main.py 提供了接口(但是我还没研究明白) ### 执行样例: ```python Running process 1 ----------------- [1] --> msg in: t_wrong [1] Waiting for user... [UserTask(Which option?)] [1] --> msg in: t0 [1] DOING: UserTask(Which option?) [1] Waiting for user... [UserTask(Down), UserTask(Up)] [1] --> msg in: tup [1] DOING: UserTask(Up) [1] Waiting for user... [UserTask(Down), ParallelGateway(ParallelGateway_0vffee4)] [1] --> msg in: t_wrong [1] Waiting for user... [UserTask(Down), ParallelGateway(ParallelGateway_0vffee4)] [1] --> msg in: tdown [1] DOING: UserTask(Down) [1] DOING: ManualTask(Manual Task 2) [1] DOING: ServiceTask(Task 3) [1] - checking variables={} with ['option==1']... [1] DONE: Result is False [1] - going down default path... [1] Waiting for user... [UserTask(Task down)] [1] --> msg in: t_wrong [1] Waiting for user... [UserTask(Task down)] [1] --> msg in: tup2 [1] Waiting for user... [UserTask(Task down)] [1] --> msg in: t_wrong [1] Waiting for user... [UserTask(Task down)] [1] --> msg in: tdown2 [1] DOING: UserTask(Task down) [1] DONE Running process 2 ----------------- [2] --> msg in: t_wrong [2] Waiting for user... [UserTask(Which option?)] [2] --> msg in: t0 [2] DOING: UserTask(Which option?) [2] Waiting for user... [UserTask(Down), UserTask(Up)] [2] --> msg in: tup [2] DOING: UserTask(Up) [2] Waiting for user... [UserTask(Down), ParallelGateway(ParallelGateway_0vffee4)] [2] --> msg in: t_wrong [2] Waiting for user... [UserTask(Down), ParallelGateway(ParallelGateway_0vffee4)] [2] --> msg in: tdown [2] DOING: UserTask(Down) [2] DOING: ManualTask(Manual Task 2) [2] DOING: ServiceTask(Task 3) [2] - checking variables={} with ['option==1']... [2] DONE: Result is False [2] - going down default path... [2] Waiting for user... [UserTask(Task down)] [2] --> msg in: t_wrong [2] Waiting for user... [UserTask(Task down)] [2] --> msg in: tup2 [2] Waiting for user... [UserTask(Task down)] [2] --> msg in: t_wrong [2] Waiting for user... [UserTask(Task down)] [2] --> msg in: tdown2 [2] DOING: UserTask(Task down) [2] DONE ```