cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Can the system account initiate the workflow on behalf of User

Jump to solution

My scenario is, I have one document library which is read only to everyone. However, any users can request for deleting the document in it. I have a customize delete button on the ribbon (not OOTB delete button), this delete button will trigger the event to capture the comment of user (why he/she want to delete this document). After the user input the comment and submit for deletion, the workflow start kick-off. Can we trigger the workflow with system account like impersonate from this button event? To run the workflow directly from the library, the user should have at least contribute permission, right?

Did anyone implement this kind of situation? Kindly advise if there a way to initiate the workflow with system account? 

Thanks.

Labels: (1)
Tags (1)
Reply
7 Replies
Workflow Hero

Re: Can the system account initiate the workflow on behalf of User

Jump to solution

some workflow actions (eg. action set) have an option 'Run as workflow owner' which allows them to run with owner's priviledges instead of initiator one.

so add an 'action set' action to workflow and move into it all the actions you want to run with owner's priviledges.

enable the  'Run as workflow owner' option on action set.

publish workflow with service account.

Reply
Workflow Hero

Re: Can the system account initiate the workflow on behalf of User

Jump to solution

I suggest that your button should create a new item on a list named "ToBeDeleted" with the Id of the item to be deleted. Then you can create a scheduled workflow that queries the list "ToBeDeleted" and deletes the documents inside that list.

Reply
Workflow Hero

Re: Can the system account initiate the workflow on behalf of User

Jump to solution

Thanks for your suggestion Marian. Those action set can achieve after triggering the workflow, right? Is there a way to kick off the workflow with workflow owner right?

0 Kudos
Reply
Workflow Hero

Re: Can the system account initiate the workflow on behalf of User

Jump to solution

I like your idea Fernando, I should capture the ID of the item which I want to delete from that library and save it in SharePoint list. Then the workflow will run based on creation of the item. If approved, delete the document from the Library. If not, delete the recorded ID from the current list. I am going to try in this way. Thanks a lot

Reply
Workflow Hero

Re: Can the system account initiate the workflow on behalf of User

Jump to solution

action set is regular workflow action. so yes, workflow has to run in order action was executed.

despite workflow itself will run with initiator privileges, all the actions within the action set will run with workflow owner privileges.

if you really want to start workflow with owner privileges, you can do it so that you create two workflows.

principle is similar to above, but instead of putting single actions into action set you will start another workflow from within action set. if you configure action set to run with owner's privileges, started workflow will run with these privileges as well.

Reply
Workflow Hero

Re: Can the system account initiate the workflow on behalf of User

Jump to solution

Thanks a lot Marian, I will try with this approach as well.

0 Kudos
Reply
Workflow Hero

Re: Can the system account initiate the workflow on behalf of User

Jump to solution

Have you tried it? Please set it as answered

0 Kudos
Reply