Re: Evaluating on the amount of items returned in a message

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Evaluating on the amount of items returned in a message › Re: Evaluating on the amount of items returned in a message

#23352

Hi Grant,

 

   Have a look at the following link: http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx

   You would follow the same pattern that the blog’s author details in Suggestion 1 with the loop and counters, etc.

    Inside your loop, you would assign the following statement to a String variable in an Expression shape: MyVar = MyVar + “<BACSBody>”+sbRemitMsg.ToString()+”</BACSBody>” every time you loop through. Then you would have a decide shape inside the loop to look for a counter of batch of 30 records: if it is 30 records then you will have an Expression shape where you will do RemitXmlDoc.LoadXml(strHeaderRemitMsg + MyVar + strTrailerRemitMsg); and ouptut this message to a Send Port (if you want), reset the counter and move along in the workflow.

    This scenario would work well if your message is not that large, assuming that’s the case, otherwise your orchestration will get a performance hit.

    Regards,

 

    Daniel.