Orchestration loop

Home Page Forums BizTalk 2004 – BizTalk 2010 Orchestration loop

Viewing 1 reply thread
  • Author
    Posts
    • #22848

      my orchestration has an RFC Call to update data in SAP. If a user has the information locked, I get a status of  “NOT_OK”. I would like to use the loop to retry until I get a response of  “OK”. However, I would like to only try 5 or 6 times.  How do I create a counter that I can increment on each run through the loop?

      I would like my loop expression to be:

      ((Msg_From_SAP.STATUS_OUT == “NOT OK”) & (LoopCount < 6)) 

    • #22852

      Create an orchestration variable called LoopCount of type System.Int32.

      Inside the loop add an expression shape with LoopCount=LoopCount+1;

      • #22858

        Thank you!

        • #25063

          Hi,  please clearly exaplain the loop i am new for the Biztalk. how you solved.

          where exactly create the SAP-Out variable etc.? if possible pls send souce code to me

           

          • #25071

            In my case, the SAP-out variable would return either “OK”, “locked”, or some error message.

            When Biztalk received a “locked” message, I send the user an email asking them to exit the order so biztalk can perform the update. I then delay biztalk for 60 and retry. I use the counter to keep track of how many times I retried (after 5 trys, Biztalk sends an email to a user group telling them what biztalk was attempting to do)

            here are Biztalk details

            I use Decide shape to test for “locked”

            I use Expresssion to assign loop count to 0 “loopcount = 0;”

            I use Delay shape to Delay 60 seconds “system.DateTime.UtcNow.AddSeconds(60);

            I use Loop Shape to loop upto 5 times “loopcount < 5”

            I resend

             I increment loopcount loopcount = loopcount + 1;”

            use decide shape to see if locked, if not locked, set loopcount to # higher than 5 “loopcount = 6;

            Now the loop ends and Biztalk continues on its way.

             

            I hope this helps.

             

             

             

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