控制 SharePoint 工作流的执行顺序
有没有办法控制(例如,确定优先级)SharePoint 工作流(不是工作流活动,而是整个工作流)的执行顺序?
SharePoint 列表的工作流集由使用 SharePoint Designer 创建的工作流或通过 WSP 安装的自定义工作流组成。我们希望保证某些工作流程(例如,计算某些字段的值的工作流程)在其余工作流程运行(例如,复制数据的工作流程)之前执行。
Is there a way to control (e.g., prioritize) the order in which SharePoint workflows (not workflow activities, but entire workflows) are being executed?
The set of workflows for a SharePoint list consists of workflows that are either created using SharePoint Designer or are custom workflows installed via WSP. We would like to guarantee that certain workflows (e.g., workflows which compute values for some of the fields) are executed before the rest of the workflow run (e.g., workflows that copy the data).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果这适合您,您可以改为说工作流 1 来运行工作流 2。
您可以下载 启动另一个工作流程活动以在设计器工作流程中使用。
If this works for you, you can instead say workflow 1 to run workflow 2.
You can download Start Another Workflow activity to use in your designer workflows.
您可能对 Codeplex Sharepoint 2010 管理包感兴趣,其中包括 工作流程管理器 - 它完全符合您的要求:确定工作流程的优先级并按特定顺序执行它们。
You might be interested in the Codeplex Sharepoint 2010 Admin Pack, which includes the Workflow Organizer - it does exactly what you want: Prioritize Workflows and execute them in a specific order.
您可以暂停(暂停活动)需要在第一个之后运行的工作流程。它可以堆叠起来,一个等待 5 分钟,另一个等待 10 分钟,等等。我不相信第一个会等待第二个完成后再开始,除非这是某个地方的设置。
我遇到了这个问题,一个工作流程使用 ID 字段创建一个简单的 ID“problem_[ID]”,另一个工作流程使用该字段在另一个列表中创建记录。如果创建记录首先运行,它将填充“problem_”或不运行。暂停解决了问题。我也会尝试最后发布的任何工作流程,但我不想冒我的前任发布工作流程并破坏系统的风险。
You could pause (pause activity) your workflow that needs to run after the first. It could be stacked, one waits 5 min, another waits 10, etc. I don't believe the first one will wait for the second one to finish before starting, unless that's a setting somewhere.
I had this problem with a workflow that was using the ID field to create a simple ID "problem_[ID]" and another workflow using that field to create a record in another list. If the creation record ran first, it would either populate with "problem_" or not run. Pausing solved the problem. I would also experiment with whatever workflow was published last, but I didn't want to run the risk of my predecesor publishing a workflow and breaking the system.
添加为每个工作流程命名的布尔字段,例如 W2、W3。为了便于讨论,假设工作流程的名称相同。
它们都可能尝试同时运行,设置两个(W2和W3)立即暂停1分钟,让W1运行,因为它会先运行。在 W1 运行结束时,将字段 W2 设置为“是”。
然后在 W2 中,设置为等待字段 W2 等于“是”,然后允许该工作流运行。在 W2 运行结束时,将字段 W2 设置为“否”,将 W3 设置为“是”。
然后在 W3 中,设置为等待字段 W3 等于“是”,然后允许该工作流运行。在 W3 运行结束时,将字段 W3 设置为“否”。
所有工作流都将运行,但操作将按照 W1 - W2 - W3 的顺序运行。
Add Boolean fields named for each of your workflows such as W2, W3. Assume Workflows are named the same for the sake of this discussion.
They all may try to run at the same time, set two (W2 and W3) to pause 1 minute immediately, allow W1 to run as it will run first. At the end of W1's run, set field W2 to Yes.
Then in W2, set to Wait for field W2 to equal Yes, then allow that workflow to run. At the end of W2's run, set field W2 to No and W3 to Yes.
Then in W3, set to Wait for field W3 to equal Yes, then allow that workflow to run. At the end of W3's run, set field W3 to No.
All workflows will run, but actions will run in the W1 - W2 - W3 order.