如何停止执行自定义活动,直到共享点站点(列表)上发生 ListItemChanged 事件

发布于 2024-12-28 20:57:00 字数 483 浏览 1 评论 0原文

我正在构建一个自定义 Sharepoint 2010 活动,它执行一些业务逻辑,并在该过程结束时,它会写下一个包含一些数据的列表项。我需要该活动来保持工作流程的执行,直到列表项发生更改(假设直到数据经过审查和批准)。轮询列表是不可接受的,所以我尝试了以下解决方案...

自定义活动设计

所以逻辑是,在活动执行之后方法执行后, whileActivity1 保持执行循环,直到handleExternalEventActivity1 事件处理程序看到 listItem Status 列更改为“approved”。如果状态不是“已批准”,事件处理程序应该保留执行直到下一个事件发生...

通过这种设计,我确实可以看到执行第一次停止,但是当我更改 listItem 中的 Status 值时,什么也没有发生。

任何人都可以帮我解决这个问题吗?我对设计本身有更好的解决方案,这也是可以接受的。

I'm building a custom Sharepoint 2010 activity which does some business logic, and at the end of that process, it writes down a list item with some data. I need that activity to hold execution of the workflow until the list item changes (let's say until that data is reviewed and approved). Polling the list is unacceptable, so i tried the following solution...

Custom activity design

So the logic is that after activity's Execute method is executed, whileActivity1 keep the execution looping until handleExternalEventActivity1 event handler see that listItem Status column is changed to "approved". If status is not "approved", event handler should hold the execution until next event occurs...

With this design, I really can see that execution stops the first time, but when I change the Status value in the listItem, nothing happens.

Anyone can help me with this? I you have better solution for the design itself, that's acceptable too.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小霸王臭丫头 2025-01-04 20:57:00

查看是否 这个答案符合您的需求。无论如何,尽量避免使用延迟活动/while 循环(它不是实时的)。

See if this answer fit your needs. In any case, try to avoid using delay activities/while loop (it's not real time).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文