How to start a workflow with read permission

  • 17 February 2015
  • 9 replies
  • 19 views

Badge +1

Hi!

 

I'd like to know if anyone knows the best way to start a workflow on an item when the current user is only having read-only-permission (no edit-permission). It seems to me, that I need edit-permission to start a workflow. In this case it would not be neccessary as we do only readings on the item and create new entry in a different list.

 

Any proposals?

 

Kind regards,

Markus


9 replies

Userlevel 4
Badge +12

Hey Markus,

SharePoint doesn't allow the excecution of a workflow for an item, for which a user only has read permission. Nintex cannot override this design concept.

We faced the same problem once. Basically we allowed people to edit the item but set up an event handler programmatically, that prevented the item from being modified by the user under certain circumstances.

Badge +17

Markus,

The way you would do that would be to use an Action set and in the common settings have it run as the owner who published the workflow. This should work, but again may not if you are requiring the user to do something that requires contribute rights.

Badge +11

Hi Markus,

As Enrico said, you cannot start the workflow with read permissions. If you want to take a longer route, then create a similar list for the users where they have edit permissions. This list could just have the name of item from main list. Reference the item and let them start the workflow here. This, inturn should start the workflow on the main list and carry out the actions.

Badge +17

Kapil is correct.  Users must have at minimal Edit or Contribute permissions to start a workflow on at item.  Anything below that will get an access denied or no link to start the workflow with.

Userlevel 5
Badge +12

Hello,

What determines if a workflow should be started or when it should be run as far as your business process is concerned associated with a specific item? 

Thanks

Badge +5

Markus,

As others have indicated this is a SharePoint issue. There are a couple approaches to resolving this. The simplest, which we use regularly, is to have the users start a Site Workflow - which they can with read permissions on the site. This site workflow then runs the list/library workflow with elevated permissions (as a system service account). Obviously there are a couple things that are needed:

  • A custom Nintex WF start form that uses javascript to capture the itemID of the list/lib item being processed. This is passed in the URL that calls the site workflow, and is needed to call the list/lib workflow to run on that item.
  • The starting site workflow will have the username as the initiator, but this will need to be passed to the list/lib workflow - if you want to keep track of who made the request. This can be stored in a separate list somewhere, or in a column in your target list/lib.
  • Any data you want to pass from the site workflow to the list/lib workflow will need to be passed as Association Data within the Call Web Service action. If you want to retain any of this data in your list/lib, you'll need appropriate columns to store it.

Hope this helps.

Badge +3

Thanks for this tip Gerard. It seems to work for me but I am wondering how I can start a site workflow with URL withtout using TemplateID (it's changing every time we publish the workflow).

Could you explain here how your URL is formatted and how do you call the workflow ?

Badge +3

Hi

suppose you have a read-only list RO and a FAKE list with create permission :

Another way to do this :

  • Create a FAKE list with sufficient permissions
  • Create a item menu with SPD on RO list to create an item on FAKE list : /sites/xxx/Lists/FAKE/NewForm.aspx?id={ItemId}&Source={SiteUrl}/Lists/RO
    • This url is relative
    • goto to create an item in FAKE
    • pass the id of the item to start workflow on
    • go back to the RO list
  • On the FAKE list form
    • use fn-qurerystring to get id parameter and bind it to a column of FAKE list
    • use as many calculated value as you want to display columns from RO list
  • Add a workflow to start on create a new item on FAKE list with only one action :
    • call web service
      • siteurl/_vti_bin/nintexworkflow/workflow.asmx
      • User : a user with suficient permission
      • Method : StartWorkflowOnListItem
      • ItemID : stored ID
      • listname : RO
      • workflowname : xxx
Badge +5

Alexandre,

You can use the "WorkflowName" parameter in the querystring instead of the WorkflowID.

To reference the workflow name simply add: ?WorkflowName=MyWorkflow

 

So the complete URL looks like: http://my.local.dom/_layouts/15/NintexWorkflow/StartWorkflow.aspx?WorkflowName=MyWorkflow

Hope this helps,

Gerard

Reply