避免因工作流所做的更改而触发 OnWorkflowItem 更改
我有一个状态机工作流程,可以响应列表项中的更改。 工作流程还会更新列表项; 当工作流进行更改时,有什么方法可以避免触发 OnWorkflowItem 更改事件?
I have a state machine workflow that responds to changes in a list item. The workflow also updates the list item; is there any way to avoid firing the OnWorkflowItem changed event when the changes were made by the workflow?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用列表项的 .SystemUpdate() 方法而不是 Update()。
use the List item's .SystemUpdate() method instead of Update().
所以我找到了一个解决方法,但它非常丑陋,希望有人有更好的答案。
我没有让一个状态进行更新然后等待事件,而是将其分为两个状态。 第一个状态更新列表项,捕获更改事件,然后转换到等待用户更改的第二个状态。
So I found a workaround for this, but it's pretty ugly, hopefully someone has a better answer.
Rather than having one state do an update and then wait for the event, I split it out into two states. The first state updates the list item, catches that on change event, and transitions to the second state which waits for the a change from the user.