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

#23402

Hi Grant,

 

   In my previous post, I mentioned that your Decide shape should have the If Branch rule with its conditional statement set to nMessageCount == 30 , with nMessageCount being a secondary counter that you would use as a message batch counter, and you would reset that counter in the If Branch rule workflow.

   Also, are you iterating through your original message in your loop, because you should not be getting the same message each time your loop comes around? To concatenate your messages together after extracting each one from your original message, define a Scope shape with transaction type Atomic, and inside that scope shape, define two variables, one of type System.Xml.XmlNode and the other of type System.Xml.XmlNodeList (let’s call them vXmlNode and vXmlNodeList). Then define an Expression shape in your Scope shape, that have the following lines of code (let’s call your original message InputMessage):

vXmlNodeList = xpath(InputMessage, “/*[local-name()=’Employees’ and namespace-uri()=”]/*[local-name()=’Employee’ and namespace-uri()=”][” + nLoopCount + “]”);

vXmlNode = vXmlNodeList.Item(0);

myVar = myVar + vXmlNode.InnerText;

 

   This should help you achieve what you want. Let me know how you make out on this.

 

   Daniel.