假设我想实现类似于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.
更多推荐
具有自定义持久性的工作流程
发布评论