How to use value within Scope shape in Catch Exception block?

Home Page Forums BizTalk 2004 – BizTalk 2010 How to use value within Scope shape in Catch Exception block?

Viewing 2 reply threads
  • Author
    Posts
    • #15729

      Hi,

      I want to use value present in scope shape in catch Exception block in order to update some tables when failure occures.

      But i am not able to access it. How can i access these value in Catch Exception block?

      Thanks in advanced.

    • #15746

      Maybe try declaring a variable at the top of your Orchestration and set it to a default value.  Then, set it inside the Catch Block on an error.  See if that would works.

    • #15907

      The best way to think of a Scope shape that has a Catch block is as a Try/Catch structure.  For instance:

      try
      {
         string myString = "Test";
         // Scope Contents Here
      }
      catch (Exception ex)
      {
         // Catch contents here.
      }

      As you can see, if your scope is declaring a variable, it will of course not be available within the catch because it has fallen out of "scope".  As Stephen recommended, if you declare the variable outside the scope then it will be available to both Scope and Catch for use.

      Tim Rayburn
      Principal Consultant, Sogeti USA LLC
      http://www.TimRayburn.net

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