locked
Invoke another workflow from current workflow RRS feed

  • Question

  • Hi,

    I'm using WF 4 and in my project I have created two workflows wich depend on eachother.

    The first workflow needs to start an instance of the second workflow. Then when the second workflow is finnished it needs to tell the first workflow about it.

    Questions:

    1. How can I start the second workflow from my first?

    2. How can the second workflow notify the first that it's done?
    • Moved by Andrew_Zhu Wednesday, February 10, 2010 2:26 AM (From:Windows Workflow Foundation)
    Friday, February 5, 2010 12:22 PM

Answers

  • I figured it out.
    It's two WorkflowService in the same project. So I just added them both as Service Reference. Then after rebuilding the solution the activities nicely appear in the toolbox  :)

    • Marked as answer by mimolo Wednesday, February 10, 2010 8:27 AM
    Wednesday, February 10, 2010 8:27 AM

All replies

  • Hi,
    it might be interesting to know, whether you´re using Composite-Activities or Code-Activities. If you´re using Code-Activities, you can use the WorkflowInvokerClass (maybe that would help: http://blogs.msdn.com/bursteg/archive/2009/05/19/wf-4-0-how-to-execute-a-worklflow-workflowinvoker-vs-workflowinstance.aspx). And if the first workflow is a composite-Activity, it´s very easy to drag´n drop the second workflow in (or maybe not, if you´re using beta 2, I think there´s a bug in the workflow designer)
    Monday, February 8, 2010 9:30 AM
  • I figured it out.
    It's two WorkflowService in the same project. So I just added them both as Service Reference. Then after rebuilding the solution the activities nicely appear in the toolbox  :)

    • Marked as answer by mimolo Wednesday, February 10, 2010 8:27 AM
    Wednesday, February 10, 2010 8:27 AM
  • Hi,
    Please show me step by step
    Thanks
    Thursday, February 11, 2010 8:03 PM
  • I figured it out.
    It's two WorkflowService in the same project. So I just added them both as Service Reference. Then after rebuilding the solution the activities nicely appear in the toolbox  :)


    Hi,
    Please show me step by step
    Thanks
    Thursday, February 11, 2010 8:07 PM
  • In the workflowservice project just right-click the project and choose Add Service Reference and point out the path to Service2.xamlx.

    Rebould solution and the activities in the Service2.xamlx appear in the toolbox
    Friday, February 26, 2010 2:10 PM