none
Calling a Workflow from another workflow RRS feed

  • Question

  • Hi,

    I have a business requirement where I will have to call workflow B from workflow A.

    Workflow B : 

    • List Workflow
    • 'No-Code' Workflow implemented in Visual Studio 2015
    • Deployed through SharePoint add-in
    • Calls a web service which is hosted in azure.

    Workflow A : 

    • List Wrkflow
    • Created in SharePoint Designer.

    It will be great if some one has done this  before and can help. Thanks a lot!

    Regards, Animesh


    • Edited by animesh.kar Wednesday, March 15, 2017 6:47 AM
    Wednesday, March 15, 2017 6:45 AM

All replies

  • Hi,

    If you’re using SharePoint 2013 workflow, try to start workflow from another workflow by REST api.

    /_api/SP.WorkflowServices.WorkflowInstanceService.Current/StartWorkflowOnListItemBySubscriptionId

    You could check below thread for details.

    https://blogs.msdn.microsoft.com/sridhara/2014/08/21/fix-sharepoint-2013-workflow-recursion-prevention-part-2/

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, March 16, 2017 1:51 AM
  • Hi Lee,

    Thanks for your time and help with the reply.

    In my case workflow A is a SharePoint 2013 workflow. However Workflow B is App/Add-in workflow implemented in Visual Studio 2015. The suggested approach won't work here unfortunately.

    Regards, Animesh

    Thursday, March 16, 2017 7:21 AM
  • Hi,

    Based on my understanding, if your workflow are both based on SharePoint 2013 workflow, it should be work( the author mentioned another example to start other workflow( VS workflow/SharePoint designer workflow) from VS workflow ).

    https://blogs.msdn.microsoft.com/sridhara/2014/08/22/fix-sharepoint-2013-workflow-recursion-prevention-part-3/

    I’ll try to test to start a VS workflow from SharePoint designer workflow and you could try also.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, March 17, 2017 2:01 PM
  • Hi,

    I have done the testing to start the workflow from SharePoint designer workflow( both based on SharePoint 2013 workflow).

    Visual studio workflow, just writing a log for test purpose :

    SharePoint designer workflow:

    Results:

    Visual studio workflow:

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, March 21, 2017 10:05 AM
  • Hi Lee,

    Just wondering did you deploy the workflow with SharePoint add-in? In my scenario the my Workflow B is built with SharePoint Provider Hosted add-in. Could you please confirm that for me.

    Thanks in advance!

    Regards, Animesh


    • Edited by animesh.kar Monday, March 27, 2017 11:34 AM
    Monday, March 27, 2017 11:32 AM
  • Hi,

    The visual studio workflow is a farm solution in my test case, I need environment to test add-in scenario so it may take some days.

    But you could try to test this approach as it’s not so complicate.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, March 28, 2017 11:09 AM