SharePoint 工作流用户

发布于 2024-08-28 06:24:42 字数 565 浏览 2 评论 0 原文

我在 Visual Studio 中创建了一个 SharePoint 工作流程,我已从默认的 SharePoint 审批工作流程扩展了此工作流程,如下所述 此处

工作流程运行正常。有没有办法让工作流程在用户而不是系统帐户的上下文中运行?

I have created a SharePoint workflow in visual studio , I have extended this workflow from the default SharePoint approval workflow as discribed here

The workflow is running properly. Is there a way I can get the workflow to run in the context of the user instead of th system account?

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

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

发布评论

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

评论(1

佞臣 2024-09-04 06:24:42

这并不像看起来那么理想,有几个原因。首先,工作流程必须执行用户无权直接执行的操作。其次,工作流是后台任务,因此在代码运行时可能没有登录用户。

如果您只需要以用户身份运行特定任务,请查看 http://blackninjasoftware.com/2009/04/09/how-to-programmatically-impersonate-users-in-sharepoint/

There are a couple of reasons this is not as desirable as it might seem. Firstly, the wrorkflow has to do things that the user does not have permissions to do directly. Secondly, workflows are background tasks, and as such there may not be a logged in user when the code is running.

If you just need a specific task to run as a user, take a look at http://blackninjasoftware.com/2009/04/09/how-to-programmatically-impersonate-users-in-sharepoint/

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