延迟活动在Sharepoint 2010工作流中并不总是有效 [英] Delay activity not always working in Sharepoint 2010 workflow

查看:71
本文介绍了延迟活动在Sharepoint 2010工作流中并不总是有效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我们在sharepoint 2010中有一个顺序工作流,该工作流具有延迟活动。

Currently we have a sequential workflow in sharepoint 2010 that has a delay activity.

延迟设置为五分钟。工作流会检查五个任务的状态,并根据结果检查是否延迟或完成。

The delay is set to five minutes. The workflow checks on the status of five tasks and depending on the results, it either delays or completes.

我将工作流历史记录日志项设置为在延迟之前写

I have a workflow history log item set to write right before the delay and right after the delay.

有时延迟不会触发,例如:

Sometimes the delay does not fire, an example would be as follows:

一件物品的延迟活动每五分钟触发3天,然后由于某种特殊原因未能唤醒17个小时……然后触发并完成。

Delay activity fires every five minutes for 3 full days on one item, then for no particular reason it fails to wake up for 17 hours...then fires and completes.

有任何想法吗?我已经验证了所有计时器服务是否正常运行等等。

Any ideas? I have verified all of the timer services are running properly etc.

另一个奇怪的是,可以运行20个工作流项目,只有4或5个会出现此问题,这似乎是完全随机的。

The other odd thing is that there can be 20 workflows items running and only 4 or 5 will have this issue, it seems totally random.

另外:如果我更改了导致工作流程重新运行的工作流程项目,则延迟活动将在下一个5点唤醒分钟周期。

Also: If I make a change to the workflow item that causes the workflow to re-run, the delay activity will awaken at the next 5 minute cycle.

更新:我在错误日志中发现了一个错误,该错误是在延迟未能唤醒时发生的。

Update: I have found an error in my error log that occurs when the delay fails to awaken.

Workflow ID=07acf527-d5cb-41c7-a8e4-58329652dc53 attempting to run on a thread currently executing workflow ID=fe2d7670-7d3e-4e6a-b024-0cc3485aa73b.  This workflow will be run at a later time.

更新:显然是因为从另一个工作流以编程方式启动具有延迟的工作流。这将导致第二个工作流在同一线程中启动。有人知道如何以编程方式指定新线程吗?

Update: Apparently this is occurring because the workflow with the delay is being started programmatically from another workflow. This causes the second workflow to be started in the same thread. Anyone know how to specify a new thread programmatically?

更新2:我将一些工作流设置为延迟5分钟运行,以查看睡眠周期是否有任何模式。工作流以5分钟的间隔睡眠约6个小时,然后计时器开始递增,如下所示:
5分钟
15分钟
45分钟
1.5小时
3小时
6小时
12小时

Update 2: I setup some workflows to run with a 5 minute delay to see if there was any pattern to the sleep cycles. The workflows slept at 5 minute intervals for around 6 hours then the timer started to increment as follows 5 minutes 15 minutes 45 minutes 1.5 hours 3 hours 6 hours 12 hours

似乎大多数时候延迟计时器都加倍了。我确信MS可以弄清楚这一点,我有大量的日志和示例。

It looks like the delay timers are being doubled for the most part. I sure MS can figure this one out, I have tons of logs and examples.

推荐答案

此问题已解决。我忘记发布决议了……

This issue has been resolved. I had forgotten to post the resolution...

需要修改三个设置。工作流节流阀,工作流批处理和隐藏的工作流计时器。

Three settings needed to be modified. Workflow Throttle, Workflow Batch, and the Hidden Workflow Timer.

您可以通过运行以下命令来检查当前的节流阀设置:

You can check the current throttle setting by running the following command:


stsadm -o getproperty -pn
work-eventdelivery-throttle

stsadm -o getproperty -pn workflow-eventdelivery-throttle

这是我的新设置:


stsadm -o setproperty -pn
work-eventdelivery-throttle -pv
45

stsadm -o setproperty -pn workflow-eventdelivery-throttle -pv "45"

您可以通过运行以下命令来检查当前的批量大小设置:

You can check the current batch size setting by running the following command:


stsadm -o getproperty -pn
workitem-eventdelivery-batchsize

stsadm -o getproperty -pn workitem-eventdelivery-batchsize

此处是我的新设置。


stsadm -o setproperty -pn
workitem-eventdelivery-batchsize -pv
250

stsadm -o setproperty -pn workitem-eventdelivery-batchsize -pv "250"

您可以通过运行以下命令来检查当前时间间隔设置,在该命令中,您可以使用网址替换网址d SharePoint应用程序的路径:

You can check the current interval setting by running the following command, in which you replace the URL with a valid path to a SharePoint application:


stsadm -o getproperty -pn job-workflow
-url http:// yoursiteurl

这是我的设置:


stsadm -o setproperty -pn工作流程
-pv每5分钟在0到59之间 -url http://您的网站网址

这篇关于延迟活动在Sharepoint 2010工作流中并不总是有效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆