web service workflow

I've asked this before in one of my previous posts but it got buried under and can't get the answer. Here it goes again.
1. I've followed AddService using in the book. Seems to be clear. The problem I'm facing is that my next activity happens day later, unlike in AddService scenario where webservicereceive is followed by webservicerespond immediately. How does the host (iis ) brings in serialized workflow instance into the memory and what triggers this. I've enabled tracking and persistence using sqlserver
As an example if we take AddService and request addition of two number and then come back 2 days later or at any arbitrary time period for the answer. How to deal with this

2. I've also been trying to throw my defined expceptions in the code that's being called after the WebService get called but the exceptions don't seem to fire.

3. is there a mechanism to prevent by the workflow calling out of the sequence webmethods of the workflow For example, if the flow defines steps (webreceive) 1, 2, 3 and 4, how to prevent call into 3 without calling 2 before




Answer this question

web service workflow

  • Barnabas

    So in that case you are talking about managing something like a long-running workflow backing up a Web Service

    In Beta 1 (not sure how this will sort out in later builds) - you can add additional WebServiceReceive and WebServiceResponse under events.  So the first one will instatiate the workflow instance, and then subsequent invocations will get routed to the event driven Activities.

    The glue that holds this all together is ASP.NET Session.  The workflow instances are held in ASP.NET session based on the client - so the client must present an ASP.NET cookie and Session must be enabled on the server.



  • shrek2006

    To Jon Flanders:

    I have read your long-running workflow sample, it is a good example. But if the workflow webservice is rebuilt or the asp session expired, the workflow instances in the session lost. How can we persist the session Should I custom the WorkflowRuntime Or the WorkflowRuntimeSection

  • Michiel Wories - MSFT

    I would like to see a sample that would follow up on these issues. I was told a sample would be created long ago but nothing materialized. I had to put our WWF work on the back burner until we had time to work out some of these fundamental questions/issues.


  • mallio

    ASP.Net sessions can be persisted to another state provider such as SQL Server or a separate out of process state service,

    with kind regards,

    Joris [MVP WSS - http://jopx.blogspot.com]


  • helpstring

    what if the client goes away for period of time longer than the session expiration or if different client will participate in the workflow updating states Would setting high session expiration timeout remedy the first issue How to deal with the 2nd problems of different clients accessing the workflow instance

    Also, any answers to exeption part of the question of should we wait for beta2 or some kind of official release with vs2005

  • Pinakin

    I have the same question how to persist the asp session. If the session expirate or I rebuild the web service, the instances contained in the session  lost. When  I invoke the web service method, it will say "Current Session has no workflow instances, you should send activate message .....". Then, how can I keep the asp session state after I restart the iis or any other operations destroyed the session.

  • rscp

  • web service workflow