当客户端运行Vista或Windows 7时,为什么SharePoint工作流会失败? [英] Why does my SharePoint workflow fail when the client is running Vista or Windows 7?

查看:123
本文介绍了当客户端运行Vista或Windows 7时,为什么SharePoint工作流会失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与类似问题.

我有一个自定义的顺序SharePoint工作流,在Visual Studio 2008中进行了删除.它与提交到表单库的InfoPath表单关联.它被配置为在创建项目时自动启动.

I have a custom sequential SharePoint workflow, deleoped in Visual Studio 2008. It is associated with an InfoPath form submitted to a form library. It is configured to automatically start when an item is created.

有时可以.有时它只是无法启动.

It works sometimes. Sometimes it just fails to start.

就像上面链接的问题一样,我在调试器中进行了检查,问题是当工作流触发时,作为库中的列发布的InfoPath字段为空. (我用workflowProperties.Item["fieldName"]访问这些字段.)但是似乎存在竞争条件,因为这些字段实际上显示在库视图中,并且如果我终止失败的工作流程并手动重新启动它,则可以正常工作!

Just like the question linked above, I checked in the debugger, and the issue is that the InfoPath fields published as columns in the library are empty when the workflow fires. (I access the fields with workflowProperties.Item["fieldName"].) But there appears to be a race condition, as those fields actually show up in the library view, and if I terminate the failed workflow and restart it manually, it works fine!

经过大量的初步研究和测试,我确定如果用户在Windows XP上运行任何版本的IE,工作流都将成功启动,但是如果同一用户从Windows XP中提交相同的表单数据,则该工作流将失败Vista或Windows 7客户端计算机.

After a lot of head-scratching and testing, I've determined that the workflow will start successfully if the user is running any version of IE on Windows XP, but it fails if the same user submits the same form data from a Vista or Windows 7 client machine.

有人知道为什么会这样吗?

Does anyone have any idea why this is happening?

推荐答案

之所以发生这种情况,是因为Vista/7通过WebDAV保存了InfoPath表单,但是XP使用了另一种协议(对不起,当时不记得了). SharePoint在实际上载文件之前(即,该项目已经创建,但当前正在进行文件上载)捕获了"ItemAdded"事件.

This occurs due to the fact that Vista/7 saves InfoPath forms through WebDAV, however XP uses another protocol (sorry, can't remember at the time). SharePoint catches the "ItemAdded" event before the file is actually uploaded (that is, the item is already created, but file upload is currently in progress).

您可以采取的解决方法是添加一个Dealay活动,并等待10秒作为工作流中的第一件事(由于SPPS中构建工作流的方式,实际上将超过10秒).这样,当您执行读取项目时,上传将已经结束.为了通知用户正在发生的事情,您可以在延迟之前添加"logToHistoryList"活动.

What you can do for a workaround is to add a dealay activity and wait for 10 seconds as the first thing in your workflow (will actually be longer than ten seconds due to the way workflows are built in SPPS). This way the upload will already have ended when you perform to read the item. To inform the users about what's happening, you can add a "logToHistoryList" activity before the delay.

这篇关于当客户端运行Vista或Windows 7时,为什么SharePoint工作流会失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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