首次运行时,Sharepoint工作流失败,但手动运行时,成功 [英] Sharepoint Workflow Fails When First Run But Succeeds When Run Manually

查看:135
本文介绍了首次运行时,Sharepoint工作流失败,但手动运行时,成功的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用一个信息路径表单,该表单在提交时应该触发自定义.NET工作流.基本上,表单中的信息用于创建新的共享点站点.我看到的是,工作流第一次运行(提交表单后自动运行),工作流出错了.当我在失败后立即手动运行工作流时,工作流运行良好.

We are using an infopath form that when submitted is supposed to fire off a custom .NET workflow. Basically, the information within the form is used to create a new sharepoint site. What I am seeing happen is that the first time the workflow runs (which is automatic after the form is submitted), the workflow errors out. When I run the workflow manually immediately after it fails, the workflow runs fine.

this.workflowProperties.Item["Client Name"]

我已将问题调试到上一行,其中工作流属性为Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties类型.工作流第一次运行时,上面列出的属性(以及所有其他属性)为空.第二次运行时,客户端名称属性应为应有的状态(从信息路径表单中填充).

I've debugged the issue down to the above line where workflowProperties is of type Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties. The first time the workflow runs, the property listed above (and all others) are null. The second time it is run the client name property is as it should be (populated from the infopath form).

另一个重要的信息是,该工作流程已经运行了一年多,并且在几周前突然由于某种原因而开始无法正常工作.在过去的一个月中,我们遇到了一些权限问题,但是我看不到这可能与工作流程问题有什么关系.我以网站集管理员身份登录的用户.我使用同一用户手动启动工作流程(成功).我不认为工作流会以登录用户的身份运行(在表单提交时自动运行).

Another important piece of information is that this workflow was working fine for over a year and suddenly started not working correctly a few weeks ago for no particular reason. We were having some permissions issues the past month but I cannot see how that could be related to the workflow issue. The user I am logged in as is a site collection administrator. I use the same user to kick the workflow off manually (which succeeds). I do not think that the workflow runs as the user that is logged in though (when it is run automatically on form submission).

整个情况的另一个有趣之处:应用程序总共使用3个自定义工作流程.其中2幅是在Visual Studio中制作的-其中一件作品不错,其他作品则表现出了上述行为.最后一个是在SharePoint设计器中制作的,但是失败了.

Another interesting wrinkle to the whole situation: there are a total of 3 custom workflows that the application uses. 2 were made in visual studio - one of these works fine and other is displaying the behavior described above. The last was made in sharepoint designer and is failing.

我现在愿意尝试任何尝试.我在开发服务器上(该服务器显示生产过程中的确切症状),因此我可以尝试几乎所有操作.

I'm willing to try just about anything at this point. I am on a dev server (which displays the exact symptoms as production) so I can try just about anything.

推荐答案

如果InfoPath表单是从Vista或Win 7计算机提交的,则可能会遇到以下问题:获取InfoPath表单中的字段的NULL值.尝试添加大约10秒的延迟活动,看看您是否能够从InfoPath中获取字段的值.

If the InfoPath forms are submitted from a Vista or Win 7 machine, you might face this issue of getting a NULL value for the fields in the InfoPath form. Try adding a delay activity with around 10seconds and see if your are able to get the value of the fields from InfoPath.

有关更多详细信息,请参考此链接:

Refer to this link for more details: Why does my SharePoint workflow fail when the client is running Vista or Windows 7?

这篇关于首次运行时,Sharepoint工作流失败,但手动运行时,成功的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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