• Blog
  • Info Support
  • Career
  • Training
  • International Group
  • Info Support
  • Blog
  • Career
  • Training
  • International Group
  • Search
logo InfoSupport
  • Latest blogs
  • Popular blogs
  • Experts
      • Alles
      • Bloggers
      • Speakers
  • Meet us
  • About us
    • nl
    • en
    • .NET
    • Advanced Analytics
    • Agile
    • Akka
    • Alexa
    • Algorithms
    • Api's
    • Architectuur
    • Artificial Intelligence
    • ATDD
    • Augmented Reality
    • AWS
    • Azure
    • Big Data
    • Blockchain
    • Business Intelligence
    • Cloud
    • Code Combat
    • Cognitive Services
    • Communicatie
    • Containers
    • Continuous Delivery
    • CQRS
    • Cyber Security
    • Dapr
    • Data
    • Data & Analystics
    • Data Science
    • Data Warehousing
    • Databricks
    • DataOps
    • DevOps
    • Digital Days
    • Docker
    • eHealth
    • Enterprise Architecture
    • Hacking
    • Infrastructure & Hosting
    • Innovatie
    • Integration
    • Internet of Things
    • Java
    • Machine Learning
    • Microservices
    • Microsoft
    • Microsoft Bot Framework
    • Microsoft Data Platform
    • Mobile Development
    • Mutation Testing
    • Open source
    • Pepper
    • Power BI
    • Privacy & Ethiek
    • Python
    • Quality Assistance & Test
    • Quality Assurance & Test
    • Requirements Management
    • Scala
    • Scratch
    • Security
    • SharePoint
    • Software Architecture
    • Software development
    • Software Factory
    • SQL Server
    • SSL
    • Start-up
    • Startup thinking
    • Stryker
    • Test Quality
    • Testing
    • TLS
    • TypeScript
    • Various
    • Web Development
    • Web-scale IT
    • Xamarin
    • Alles
    • Bloggers
    • Speakers
Home » Hot fix available for Transaction inside receive activity scope bug workflow 3.5
  • Hot fix available for Transaction inside receive activity scope bug workflow 3.5

    • By Marcel de Vries
    • .NET 13 years ago
    • .NET 0 comments
    • .NET .NET
    Hot fix available for Transaction inside receive activity scope bug workflow 3.5

    *Moved to: http://fluentbytes.com/hot-fix-available-for-transaction-inside-receive-activity-scope-bug-workflow-3-5/

    Back in august I worked with a customer to build a workflow solution using Workflow 3.5. We crafted up a simple workflow where we would like to get a message into the workflow using the receive activity and then persist this call in the database, giving the caller a ticket that he can use later for reference. We could do some processing in the background and then when we finish the caller could get information based on the ticket. Now this is in my opinion a very common scenario that you probably will run into with your solutions as well.

    to make this scenario more reliable, we used a transaction scope activity to guard the database transaction and make sure the workflow get's persisted in the same transaction.

    A simplified version of the workflow we used is shown below.

    Now this looks to work perfectly correct, but we discovered that if the transaction fails you will get the following error:

    "Workflow service unexpectedly unloaded from memory while executing a ReceiveActivity. Make sure that the the workflow does not contain any blocking activities within a ReceiveActivity."

    After getting the error back the workflow will be terminated since it got an unexpected exception.
    Things can even become worse if you look from the messaging perspective, that the caller will recieve an timeout on the call, since no reply is send back. It appeared that this happened when you set the UnloadOnIdle  to false.

    To make sure I did not do anything wrong I called a friend who is also very knowledgeable about workflow and asked him what his thoughts where. He also made a blog post about this issue and spend quite some time to figure out what was going wrong here. (http://msmvps.com/blogs/theproblemsolver/archive/2008/08/06/using-a-transactionscopeactivity-with-a-wcf-receiveactivity.aspx)

    Finally I decided that this looked like a bug in the activities, so I issues a PSS call to ask for a hot fix for this problem. After working with the support department and some developers on a simple repro of the problem we finally got to the point that it was recognized as a bug and that they could build a hot fix to solve the problem.

    So back in November I received a private hot fix that solved the problem, but I wanted to make sure everybody else could leverage the fix as well, since this is such an common scenario.

    I crafted up some tests to show the problem and I could use that easily to verify if the hot fix solved the problem or not. You can see below that after applying the hot fix all tests showed green again 🙂

    Before:

    After:

     

    Last week I got the official hot fix and the analysis back from the development team that states the following:

    Root cause of the problem:

    WorkflowRequestContext, a member of ReceiveActivity, is not serialized as part of the checkpoint. Consequently, when we restore the checkpoint upon TSA fault, we are unable to send a reply message to the ReceiveActivity caller.

    We produced a fix to address this issue and delivered to our customer. This fix will be part of the next major releases of WF 3.5 (if any). KB Article 959362 will be published soon

    So if you have this same scenario in your solution, check what happens when your transaction fails, e.g. by stopping the database so the call will fail, and see if you run into the same issue. The problem I found with this bug, is that this only surfaces when you have good tests in place that also test for the failure of the transaction and that is probably not always the case. You might not even have noticed you have a problem, but at least you know you can get a hot fix now. You can refer to KB 959362 and they can hand you the hot fix for your environment.

    Cheers,
    Marcel

    Follow my new blog on http://fluentbytes.com

    Share this

Marcel de Vries

View profile

Related IT training

Go to training website

Related Consultancy solutions

Go to infosupport.com

Related blogs

  • Innovative patterns in software quality management

    Innovative patterns in software quality management Tom van den Berg - 4 months ago

  • Developing a Service Fabric service using another host

    Developing a Service Fabric service using another host Tim van de Lockand - 8 months ago

  • Adding a package to your private WinGet.RestSource feed…

    Adding a package to your private WinGet.RestSource feed… Léon Bouquiet - 1 year ago

Related downloads

  • Beslisboom voor een rechtmatig ‘kopietje productie’

  • Klantreferentie: Remmicom zet wetgeving om in intellige…

  • Klantreferentie RDW: Samenwerken voor veilig en vertrou…

  • Klantreferentie BeFrank: Strategische IT voor een innov…

  • Wie durft te experimenteren met data in de zorg?

Related videos

  • mijnverzekeringenopeenrij.nl

    mijnverzekeringenopeenrij.nl

  • Winnaar | Innovation Projects 2017

    Winnaar | Innovation Projects 2017

  • Explore | Info Support & HAN & Poliskluis

    Explore | Info Support & HAN & Poliskluis

  • Info Support | Bedrijfsfilm

    Info Support | Bedrijfsfilm

  • LifeApps bij HagaZiekenhuis

    LifeApps bij HagaZiekenhuis

Nieuwsbrief

* verplichte velden

Contact

  • Head office NL
  • Kruisboog 42
  • 3905 TG Veenendaal
  • T +31 318 552020
  • Call
  • Mail
  • Directions
  • Head office BE
  • Generaal De Wittelaan 17
  • bus 30 2800 Mechelen
  • T +32 15 286370
  • Call
  • Mail
  • Directions

Follow us

  • Twitter
  • Facebook
  • Linkedin
  • Youtube

Newsletter

Sign in

Extra

  • Media Library
  • Disclaimer
  • Algemene voorwaarden
  • ISHBS Webmail
  • Extranet
Beheer cookie toestemming
Deze website maakt gebruik van Functionele en Analytische cookies voor website optimalisatie en statistieken.
Functioneel
Altijd actief
De technische opslag of toegang is strikt noodzakelijk voor het legitieme doel het gebruik mogelijk te maken van een specifieke dienst waarom de abonnee of gebruiker uitdrukkelijk heeft gevraagd, of met als enig doel de uitvoering van de transmissie van een communicatie over een elektronisch communicatienetwerk.
Voorkeuren
De technische opslag of toegang is noodzakelijk voor het legitieme doel voorkeuren op te slaan die niet door de abonnee of gebruiker zijn aangevraagd.
Statistieken
De technische opslag of toegang die uitsluitend voor statistische doeleinden wordt gebruikt. De technische opslag of toegang die uitsluitend wordt gebruikt voor anonieme statistische doeleinden. Zonder dagvaarding, vrijwillige naleving door uw Internet Service Provider, of aanvullende gegevens van een derde partij, kan informatie die alleen voor dit doel wordt opgeslagen of opgehaald gewoonlijk niet worden gebruikt om je te identificeren.
Marketing
De technische opslag of toegang is nodig om gebruikersprofielen op te stellen voor het verzenden van reclame, of om de gebruiker op een website of over verschillende websites te volgen voor soortgelijke marketingdoeleinden.
Beheer opties Beheer diensten Beheer leveranciers Lees meer over deze doeleinden
Voorkeuren
{title} {title} {title}