具有自定义持久性的工作流程

编程入门 行业动态 更新时间:2024-10-28 10:30:27
本文介绍了具有自定义持久性的工作流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

假设我想实现类似于JIRA的东西,其中第1页。我有一个工作流界面,接收工作项ID,操作和参数 2。工作流程将解释输入,查找相应的工作流程ID并执行该操作。然后状态与基数中的数据一起持续存在(例如,item = 3,state = CONFIRMED等等)。当工作流程恢复时,它应该去读取与该工作项目id相关的特定行 如何实现上述方案?我发现SqlPersistentService等似乎以二进制格式保存数据,这使得难以维护经常变化的工作流。另一方面,GUID似乎不是我的工作流程的良好标识符。我宁愿使用workitem ID。有没有办法在不单独维护数据库中的映射的情况下执行此操作?

Let's say I would like to implement something similar to JIRA where 1. I have a workflow interface that receive work item ID, action, and parameters2. Workflow will interpret the input, look up for the appropriate workflow ID and execute that action3. The state then get persisted along with the data in a row in the base (for example, item = 3, state = CONFIRMED, etc...)4. When a workflow is resumed, it should go and read the particular row related to that work item idHow can I achieved above scenario? I found SqlPersistentService etc. seems to persist data in binary format making it difficult to maintain workflow that changes very often. On the other note, GUID seems not to be a good identifier for my workflow. I'd rather use workitem ID. Is there a way to do that without maintaining the mapping in the database separately?

推荐答案

GUID是每个工作流的默​​认标识符。即使您实现了自定义持久性服务,也需要恢复工作流的GUID。 4。要实现上述方案,您可以在工作流中声明一个变量来保存最后一个工作项ID。现在,当您的工作流程恢复时,它将适用于上次创建的工作项。 GUID is the default identifier for each workflow. Even if you implement a custom persistence service, you need the GUID of the workflow to resume.4. To achieve the above scenario, you can declare a variable in workflow to hold last work item id. now when your workflow will resume, it will work on the work item last created.

更多推荐

具有自定义持久性的工作流程

本文发布于:2023-11-25 07:21:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1628841.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:持久性   自定义   工作流程

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!