long running transactions in Biztalk

Home Page Forums BizTalk 2004 – BizTalk 2010 long running transactions in Biztalk

Viewing 1 reply thread
  • Author
    Posts
    • #12220

      Hi everyone,

      I have bigs problems understanding long running transactions . Could you please kindly clarify the following points of mine.

      1. When a long running transaction can’t commit, all of the compensation blocks of its nested transaction will be called automatically. right? There will be No automatice rollback with the current transaction. Right?
      2. in Biztalk documentation, there is a line \”If you choose to compensate the current transaction, that means that the default handler will be invoked, and not an explicit compensation block (if there is one).\” This got me really confused. Is there really a way you can choose to compensate the current transaction? How?
      3. In BizTalk documentation, \”you can add a Compensate shape in the compensation block or an exception block of a transaction scope. \” So, if compensation blocks of the nested transactions will be called automaticlly if an exception occurs (if I undersatnd it correctly), I can’t think of any situation where a compensate shape needs to added in an exception block.

      Your help is greatly appreciated!
      teddy

    • #12221

      Hi,

      I’ve added some comments. I was cocnfused with this at first, so I created an oirchestraiton, and added a bunch of transactions and compensations in a hirarchy. I added expression shapes with System.Debug.WriteLine (\”T1 Compensated\”); etc, then ran the orchestration with DebugView (you can also use VisualStudio). If you play about with this for a while you get a great idea of how it all hangs together.

      1. When a long running transaction can’t commit, all of the compensation blocks of its nested transaction will be called automatically. right? There will be No automatice rollback with the current transaction. Right?

      Hmm, maybe not correct…

      2. in Biztalk documentation, there is a line \”If you choose to compensate the current transaction, that means that the default handler will be invoked, and not an explicit compensation block (if there is one).\” This got me really confused. Is there really a way you can choose to compensate the current transaction? How?

      In an exception handler, you add a compensate shape, and specify the transaction you want to compensate. This can either be the current transaction, or one of it’s imediate child transactions. The default handler of a transaction will call the compensation blocks in it’s cheld transactionss in the reverse order that they were committed. This will run through the transaction hirarchy.

      3. In BizTalk documentation, \”you can add a Compensate shape in the compensation block or an exception block of a transaction scope. \” So, if compensation blocks of the nested transactions will be called automaticlly if an exception occurs (if I undersatnd it correctly), I can’t think of any situation where a compensate shape needs to added in an exception block.

      Compensation does not happen automatically, you need to call it explicitly (i think, sorry, don’t have time to check this…)

      Regards,

      Alan

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.