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

查看:18
本文介绍了延迟活动在 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:

延迟活动每 5 分钟触发一次,持续 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工作流事件传递节流

stsadm -o getproperty -pn workflow-eventdelivery-throttle

这是我的新设置:

stsadm -o setproperty -pn工作流事件传递节流阀 -pv45"

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工作项事件交付批量大小

stsadm -o getproperty -pn workitem-eventdelivery-batchsize

这是我的新设置.

stsadm -o setproperty -pn工作项事件交付批量大小 -pv250"

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

您可以通过运行以下命令来检查当前的时间间隔设置,在该命令中将 URL 替换为 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 getproperty -pn job-workflow -url http://yoursiteurl

这是我的设置:

stsadm -o setproperty -pn 作业工作流-pv "0 到 59 之间每 5 分钟一次" -url http://yoursiteurl

stsadm -o setproperty -pn job-workflow -pv "Every 5 minutes between 0 and 59" -url http://yoursiteurl

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

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