知识卡片
任务订阅分离引擎执行
发布订阅式任务执行让引擎按逻辑任务类型提供工作,外部处理器订阅、执行业务代码并报告完成。引擎自身承担类似代理的角色,无需额外消息代理。模型与处理器在运行时分离,但在业务上通常仍属于一个流程方案。
结构图:
sequenceDiagram
participant E as 工作流引擎
participant W as 任务处理器
participant S as 外部服务
W->>E: 订阅逻辑任务类型
E-->>W: 提供待执行工作
W->>S: 业务调用
S-->>W: 结果
W->>E: 完成任务及结果变量
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 开发流程方案 · 查看原书依据
Many workflow engines provide a similar pub/sub mechanism for logic in the process. In this scenario, the workflow engine itself acts as a broker; you don’t need an actual message broker. Instead, you write some glue code that subscribes to the workflow engine, typically to a service task in BPMN, and executes logic whenever a new process instance arrives there.
参考来源
- 位置:《Practical Process Automation》第3章《开发流程方案》(来源项目:book-sources;源文件:extracted/Practical Process Automation (Bernd Ruecker)/_epub-src/OEBPS/ch03.xhtml)
- 结论依据:原文中的定义、机制和适用条件支持上述解释,正文未将产品示例推广为所有引擎的保证。
- 原始内容:Many workflow engines provide a similar pub/sub mechanism for logic in the process. In this scenario, the workflow engine itself acts as a broker; you don’t need an actual message broker. Instead, you write some glue code that subscribes to the workflow engine, typically to a service task in BPMN, and executes logic whenever a new process instance arrives there.