Pregunta

I have a WCF workflow using AppFabric / Persistence and .net 4.0 that I know is going to have a few bugs in the code activities due to the fact that its talking to an external soap service that sometimes throws SoapExceptions as return values when an operation cannot be completed. Its unavoidable, and there are an extreme amount of exceptions to handle them all from the get-go.

While developing, when these errors occur, my workflow suspends, and I can track down the error fairly easily, and code a handler for the newly found soap exception. The problem is, after I make changes to the codeactivity and publish the new dll, a "resume" of the suspended workflow does not utilize these changes, nor can I break in the code upon resume.

The workflows try their 5 times to run, then rethrow the same error, even if it was something like throw new exception ("TEST EXCEPTION") and then i removed it from code.

I am NOT changing the definition of the workflow, just making small changes to codeactivities.

I swear I could do this in VS2010 but its been a long time since i switched to vs2012. FYI I can debug new workflows that have not been suspended. I can step through the code. Just cannot debug ones upon resume.

¿Fue útil?

Solución 2

I am able to resume and debug by upgrading the schema using C:\Windows\Microsoft.NET\Framework\v4.0.30319\SQL\en\SqlWorkflowInstanceStoreSchemaUpgrade.sql and changing to .net 4.5

It may not be the most elegant solution, but it works.

I'd also like to state that I personally hate solutions like this, especially after searching for them. If you came here and cannot deploy 4.5, I apologize.

Otros consejos

I am in doubt that you was able - I remember this from my experiences with VS2008.

I don't remember exactly why this happens, but I think you cannot. What did we do in production, when we published new code, and there were not finished (and persisted) workflows - we added assembly binding in config, that was pointed to new code. Old code was also present.

Something like this:

   <configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentAssembly>
            <assemblyIdentity name="myAssembly"
                              publicKeyToken="32ab4ba45e0a69a1"
                              culture="neutral" />
            <bindingRedirect oldVersion="1.0.0.0"
                             newVersion="2.0.0.0"/>
            <codeBase version="2.0.0.0"
                      href="http://www.litwareinc.com/myAssembly.dll"/>
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>

This can be also helpful.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top