0

I would like to use rest api to trigger my manual workflows from a list. Would like users to select some various items and click a button and then trigger the workflow on each items

I have this url below

/_layouts/15/IniWrkflIP.aspx?List={08012d13-3b9f-446b-87a6-a616a4906cc0}&ID=1&ItemGuid={7C2E6668-E4AC-4A54-89DA-5D0DE9907CAE}&TemplateID={44caed28-e898-4472-82ce-8e9fac8bfabf}

But I don't get to see the subscriptionId parameter. Is it the same as the TemplateID?

The REST api I am using is as follows:

/_api/SP.WorkflowServices.WorkflowInstanceService.Current/StartWorkflowOnListItemBySubscriptionId(subscriptionId='44caed28-e898-4472-82ce-8e9fac8bfabf',itemId=2)

Thanks in Advance

  • Using workflow 2010 or 2013? 2010 has an templateID (changes everytime you publish). 2013 has subscriptionID – Peter Deleu May 27 at 9:35
  • Thanks Peter about SP Online? – naijacoder May 28 at 0:11
  • Did you create the workflow with SharePoint Designer? – Peter Deleu May 28 at 6:42
  • check the link that you get when you want to start the workflow – Peter Deleu May 28 at 6:44
  • Thanks Peter. I taught you were referring to SP versions..Yes i was using 2010 workflows but when i created 2013 workflows i could now see the subscriptionids. Is there a way to achieve the same when using SP 2010 workflows? – naijacoder May 29 at 0:14
0

You could go to list settings-> workflow settings, click the workflow. You would see the workflow subscriptionId in the URL.

  • Hi Michael, Does this work for SP online? – naijacoder May 27 at 23:37
  • Hi Michael, When i do this - You could go to list settings-> workflow settings, click the workflow. This wants to open the workflow in SP Designer.. Not sure where you are seeing the subscriptionid here.. – naijacoder May 28 at 0:11
  • As Peter mentioned the subscriptionid is only available in SP 2013 workflows – naijacoder May 29 at 0:15
  • Yes, subscriptionid is only in workflow 2013. The rest api would not work for workflow 2010. – Michael Han_MSFT May 29 at 1:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.