已答复 SharePoint Designer 2007 Workflow Where is the code? RunWithElevatedPermissions ?

  • 23 กุมภาพันธ์ 2555 4:55
     
     

    I have created a Workflow in SharePoint Designer and need the workflow to run with elevated permissions regaurdless of the user permissions that kickoff the workflow. The workflow runs on a InfoPath form library for requesting vacation. The form then moves from the drop box to the archive library where employees will not have access to it. The workflow fails because the users that kickoff the workflow do not have access to that library. I have googled for several days and found tons of code examples. My programming background is pretty limited, I understand Public vs Private classes and methods but don't know where the code is stored for the workflow I created in SPD. I could probably figure out how to modify the code with the examples I found if I only knew where it was. SPD only displays the xml xoml and rules documents. If there is a easier method to accomplish my goal while restricting access to those resources Im all ears. 

    SharePoint 2007  W/Services 3.0

    SharePoint Designer 2007

    Server 2003

     

ตอบทั้งหมด

  • 24 กุมภาพันธ์ 2555 3:00
     
     

    could you please check the below link

    http://blogs.msdn.com/b/sharepointdesigner/archive/2008/09/28/declarative-workflows-and-user-context.aspx


    MCTS,MCPD Sharepoint 2010. My Blog- http://sharepoint-journey.com

    If a post answers your question, please click "Propose As Answer" on that post and "Vote as Helpful
  • 24 กุมภาพันธ์ 2555 3:54
     
     

    I've read that article prior too and don't see how it helps. The library is not email enabled, so it can't kick off workflows via a email. This is very frustrating, I have been searching for days and haven't found a clear answer. I appreciate you responding, if I could just get a clear answer. If my objectives can't be met with workflows from SPD then I will stop spinning my wheels pursuing it and start learning how to draft them in Visual studio. But so far no one has come out and said it, kind of beating around the bush, or if it can be done then how to do it. Thanks again

    • แก้ไขโดย Lucas718 24 กุมภาพันธ์ 2555 4:51
    •  
  • 27 กุมภาพันธ์ 2555 7:16
    ผู้ดูแล
     
     คำตอบ

    Hi Lucas718,

    When using workflows with multiple participants, each participant can have a different level of access not only to records but to entire lists.
      When a workflow is initiated, it runs under the permissions context of the user that started the workflow.  In order to guarantee the proper operation of your workflow regardless of the participants, you may need to run your workflow with elevated permissions.  This is something that can only be done with custom workflows.

    1.SharePoint Designer custom workflow activities to grant permission on item.

    http://spdactivities.codeplex.com/wikipage?title=Grant%20Permission%20on%20Item

    2. Use The RunWithElevatedPrivileges method in code.

    http://msdn.microsoft.com/en-us/library/bb466220(office.12).aspx

    Now, SharePoint 2010 workflow (SharePoint Designer 2010) is out of this hassle. SharePoint Designer 2010 workflow has a new feature called “ImpersonationStep”.(For reference only)
    http://sharepointresourcecenter.com/sharepoint-2010-workflows-impersonation.html

    Thanks,
    Lhan Han




    • แก้ไขโดย Lhan HanModerator 27 กุมภาพันธ์ 2555 7:20
    • แก้ไขโดย Lhan HanModerator 27 กุมภาพันธ์ 2555 7:21
    • ทำเครื่องหมายเป็นคำตอบโดย Lhan HanModerator 1 มีนาคม 2555 10:46
    •