知识卡片
任务作业用动作组合
超媒体工作流把独立服务动作称为task,把一组task组成job。task提供执行、重做、撤销、取消;job还支持从断点继续、从头重启和整体取消。文档声明需要完成什么,服务保留内部实现自由;撤销若涉及下游服务,必须把相应影响一并处理,不能只恢复本地值。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 用超媒体思考与设计 · 查看原书依据
The key to designing and implementing hypermedia workflows is to make sure each service that is enlisted in the flow has a composable service interface (see Recipe 7.1) that supports the following actions: Execute Do the work (e.g., computeTax, createCustomerResource, etc.). Repeat Do the same work again in case something didn’t work the first time. Revert Undo the work in case there was an error somewhere else. Cancel Stop processing the task and undo any previous work.
参考来源
- 位置:《RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)》第02章《用超媒体思考与设计》(来源项目 book-sources;源文件:extracted/RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)/_epub-src/OEBPS/ch02.xhtml;小节:超媒体工作流)
- 结论依据:原文以超媒体工作流把独立服务动作称为task,把一组task组成job的机制或场景为依据;同小节余文补充本卡所列条件,按2022年原书语境整理。
- 原始内容:The key to designing and implementing hypermedia workflows is to make sure each service that is enlisted in the flow has a composable service interface (see Recipe 7.1) that supports the following actions: Execute Do the work (e.g., computeTax, createCustomerResource, etc.). Repeat Do the same work again in case something didn’t work the first time. Revert Undo the work in case there was an error somewhere else. Cancel Stop processing the task and undo any previous work.