locked
Resuming a workflow After deploying the solution in IIS server RRS feed

  • Question

  • I tried to resume workflows through the Visual studio 2010 by pressing the F5. After the workflow persisted in Database and is not resuming. But when deployed the solution in IIS server pesrsisted workflow is resuming automatically after expiry of the time. What makes the difference?

    I invoked the workflows through the Workflowapplication and using .Net 4.0 Beta2. As per the Microsoft material Workflow management service is not supported if you hosted workflows through Workflowapplication. The follwoing is the process I tried.

    1) I deployed the web solution in IIS Server.
    2) In busioness layer I invoked the worklflow through the Workflowapplication object.
    3) After the workflow Idle because of timer, Unload instance set and persisted the workflow. At this point of time it is removed from primary memory.
    3) After the workflow invoked I closed the browser and I opend another browser.
    4) I did some application changes.
    5) I closed all the brosers.
    6) Now application is not running, but server is running.
    7) After the expiry of timer workflow resumed automaticlly. (Worklfowmanagementservice is not running).


     I am confused at this point, My workflow is in persistence store, if the same workflow I invOked through the Visual stuido 2010 pressing F5 and after the workflow is persisted, in this case workflow is not resuming automatically.

     Please let me know what is the difference between this? I am designing the workflow application. Please let me know ASAP


    rajeevkalyan
    Thursday, December 17, 2009 6:28 PM

Answers

  • It should resume automatically also when using WorkflowApplication. How do you run the workflow through WorkflowApplication? Just call WorkflowApplication.Run() ? This call returns before the instance actually completes. If there's no code running after this call and your host application ends, there's no way for the instance to get resumed. So you need to do the synchronization by hooking WorkflowApplication.Completed. Or you can simply using WorkflowInvoker.Invoke() to run the workflow, this call is synchronous and returns when the instance is finished.
    Friday, December 18, 2009 3:17 PM