知识卡片
模型升级也要兼容数据
流程版本变化还涉及任务代码和持久数据结构。旧实例缺少新字段时,先保证反序列化兼容;可让新模型引用新版处理器,或让同一处理器兼容新旧字段,也可用升级脚本补默认值。兼容代码要在旧实例退场后清理,否则多版本负担会沉积在代码中。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 开发流程方案 · 查看原书依据
First you have to make sure that you can still deserialize the data, e.g., by making the new attributes optional. Then you could simply copy code for the customer scoring and implement a new version that uses these attributes.
参考来源
- 位置:《Practical Process Automation》第3章《开发流程方案》(来源项目:book-sources;源文件:extracted/Practical Process Automation (Bernd Ruecker)/_epub-src/OEBPS/ch03.xhtml)
- 结论依据:原文中的定义、机制和适用条件支持上述解释,正文未将产品示例推广为所有引擎的保证。
- 原始内容:First you have to make sure that you can still deserialize the data, e.g., by making the new attributes optional. Then you could simply copy code for the customer scoring and implement a new version that uses these attributes.