我在哪里可以获得优秀工作流程列表?

发布于 2024-08-03 17:23:31 字数 222 浏览 2 评论 0原文

我正在努力让我的头脑了解 WF。我正在可视化一个状态机工作流,其中包含将使用 SQL 持久性服务存储的长期运行的工作流。

一位用户可能分配有多个未完成的工作流程。我无法解决两件事。

  1. 如何获取所有未完成工作流程的列表?
  2. 如何获取特定用户的工作流程列表?

我是否必须取消每个坚持(一定有一个比这更好的词)并迭代它们,或者我是否遗漏了一些东西?

I'm trying to get my head round WF. I'm visualizing a State Machine Workflow with long-running workflows that will be stored in using the SQL persistence service.

A user may have more than one outstanding workflows assigned. I can't work out two things.

  1. How do I get a list of all outstanding workflows?
  2. How do I get a list of workflows for a particular user?

Do I have to unpersist (there's gotta be a better word than that) each and iterate through them or am I missing something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

葬心 2024-08-10 17:23:31

对于这个问题你有不止一个选择。

工作流程本身与您的用户没有关系。因为 WorkflowFoundation 根本不知道您的工作流程是什么。因此,您必须提供其他信息才能从数据库中获取用户的工作流程。

第一个选项是使用 WF 跟踪功能将关联的用户存储为跟踪数据库中正在运行的工作流程的第一步。因此,您稍后可以在 SQL 数据库中查询所有具有此类附加指定用户的跟踪记录的工作流实例 ID。

第二个选项是使用自定义表来扩展数据库,该表保存用户和正在运行的工作流 ID 之间的关系。如果为用户启动新的工作流程,则将填写此表,并且当工作流程结束或运行时出现异常时,必须清除关联的记录。

You have more than one option for that question.

A workflow itself has no relationship to your user. Because WorkflowFoundation doesn't know what is your workflow about at all. So you must provide additional information to get the workflows for your users back from the database.

First option would be to use the WF Tracking feature to store the associated user as one of the first steps in your running workflow in the tracking database. So you can later query the SQL database for all workflow instance ids that have such tracking records with the specified user attached.

Second option would be to extend the database with a custom table that holds the relationship between your users and the running workflow ids. This table would be filled in case of a new workflow started for a user and the associated record must be cleared out when the workflow ends or gets an exception while running.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文