SharePoint 2010 工作流在应等待的位置自行重新启动
我在 SharePoint Designer 中创建了一个非常简单的 SP2010 工作流。工作流程设置为在创建项目时启动。它在当前项目上设置一些字段,发送电子邮件,然后等待字段不为空。由于某种原因,工作流程不会等待该字段发生更改,而是会自行重新启动,这在工作流程历史记录中看起来像这样:
28.12.2011 16:47 Comment System Account Values set!
28.12.2011 16:47 Comment System Account Email sent!
28.12.2011 16:47 Comment System Account Waiting on Assigned To
28.12.2011 16:47 Comment System Account Values set!
28.12.2011 16:47 Comment System Account Email sent!
28.12.2011 16:47 Comment System Account Waiting on Assigned To
28.12.2011 16:47 Comment System Account Values set!
28.12.2011 16:47 Comment System Account Email sent!
28.12.2011 16:47 Comment System Account Waiting on Assigned To
28.12.2011 16:47 Comment System Account Values set!
28.12.2011 16:47 Comment System Account Email sent!
28.12.2011 16:47 Comment System Account Waiting on Assigned To
4 个周期后,它会停止疯狂并等待字段按其预期进行更改。等待之后的其他一切都正常...
有什么想法为什么会发生这种情况吗?
PS:分配给是我创建的用户/组字段。
更新:
我已将问题追溯到当前项目的“标题”字段的分配。 我有一个包含 3 个选项的选择字段,并且我也允许“FillIn-Choices”。 在工作流程中,我将当前项目的“标题”字段(设置为非必需)设置为选择字段的值。如果我删除此操作,工作流程将不会执行循环。谁能向我解释为什么会发生这种情况?
I have a pretty simple SP2010 Workflow created in SharePoint Designer. The Workflow is set to start when an item is created. It sets some fields on the current item, sends an email and then is supposed to wait for a field to be not empty. For some reason the workflow is not waiting for that field to change, instead it restarts itself which looks like this in the workflow history:
28.12.2011 16:47 Comment System Account Values set!
28.12.2011 16:47 Comment System Account Email sent!
28.12.2011 16:47 Comment System Account Waiting on Assigned To
28.12.2011 16:47 Comment System Account Values set!
28.12.2011 16:47 Comment System Account Email sent!
28.12.2011 16:47 Comment System Account Waiting on Assigned To
28.12.2011 16:47 Comment System Account Values set!
28.12.2011 16:47 Comment System Account Email sent!
28.12.2011 16:47 Comment System Account Waiting on Assigned To
28.12.2011 16:47 Comment System Account Values set!
28.12.2011 16:47 Comment System Account Email sent!
28.12.2011 16:47 Comment System Account Waiting on Assigned To
After 4 cycles its stops going crazy and waits for the field to change as its supposed to be. Everything else after this wait works fine...
Any Ideas why this is happening?
P.S.: Assigned To is a User/Group field created by me.
UPDATE:
I've tracked the issue down to an assignment of the "Title" field of the current item.
I have a Choice Field with 3 options and I'm allowing "FillIn-Choices" as well.
In the workflow I set the "Title" field of the current item (which is set to be not Required) to the value of the choice field. If I remove this action the workflow does not do the loop. Can anyone explain to me why this is happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于它只重复四次,这可能是您在项目中更新的字段数量吗?尝试发布一些规则的屏幕截图。
编辑:我复制了您的详细信息,但问题没有发生(首先使用下拉+填充,然后使用复选框+填充),建议是在设置标题字段之前尝试将选择列中的值分配给变量。
我尝试隔离问题:https://i.sstatic.net/NpspG.png
配置数据库版本:14.0.4762.1000(RTM)
Since it only repeats four times, could that be the amount of fields you are updating in the item? Try posting some screenshots of your rules.
Edit: I reproduced your details and the problem did not occur(first with dropdown+fill-in then with checkboxes+fill-in), a suggestion would be to try assigning the value from the choice column into a variable before setting the title field.
My attempt to isolate the issue: https://i.sstatic.net/NpspG.png
Configuration database version: 14.0.4762.1000 (RTM)
我在使用 SharePoint 2013 和旧工作流程时遇到同样的问题。
我正在使用 OnItemAdded 接收器,它不执行任何其他操作,而是启动工作流程(当匿名用户创建列表项时,工作流程不会以选中“项目添加”的方式启动。这是解决方法。)
我认为只有当接收方启动工作流程时才会出现此问题。当我手动启动它时,它运行良好。我不明白,为什么。
这就是我为防止它重新启动 4 次而所做的:我向列表中添加了一个字段,称为 WorkflowStatus。在工作流程中,我从一个条件开始:if WorkflowStatus <> “完成”然后将其设置为“完成”,并完成其余的工作。
我知道有点晚了,但我希望它对某人有帮助......
I have the same problem using SharePoint 2013 with legacy workflow.
I am using an OnItemAdded reciever, which does nothing else, but starts the workflow (Workflows won't start with "Item Added" checked when an anonymouse user creates a list item. This is the work-around.)
I figured that this problem only occures when the workflow is started by the reciever. When I start it manually, it runs fine. I don't understand, why.
This is what I did to prevent it from restarting 4 times: I added a field to the list, called it WorkflowStatus. In the workflow, I start with a condition: if WorkflowStatus <> "done" then set it "done", and do the rest of the job.
I know it's kind of late, but I hope it helps someone...