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

#23411

Hi Grant,

    See my response below, in the quote, I am highlighting the changes in bold… Hope this makes sense.

[quote user="Zen"]

Hi Daniel,

                  Can I just give you a summary of where I am so not to waste too much of your time before I deploy and test?

 

Expression Shape (Initialize variables)

nLoopCount = 1;

nMessageCount = 1;

nRecordCount = ? (put your line of code here)

Loop shape (nLoopCount <= nRecordCount)

Atomic Scope shape (contains the following expression shape)

Expression shape (get individual node)

vXmlNodeList = xpath(BACSRemittanceMsg, “//*[local-name()=’BACSRemittance_DATA’ and namespace-uri()=’http://P5.BizTalk.Schemas.PP_SAPToBottomlineBACSRemittance_App_FF’%5D/*%5Blocal-name()=’BACSBody&#8217; and namespace-uri()=”]/*[local-name()=’BACSRemittance’ and namespace-uri()=”]/*[local-name()=’Remittance’ and namespace-uri()=”]/*[local-name()=’RemittanceDetail’ and namespace-uri()=”]/*[local-name()=’BACSRemittance_DATA’ and namespace-uri()=’http://P5.BizTalk.Schemas.PP_SAPToBottomlineBACSRemittance_App_FF’%5D/*%5Blocal-name()=’BACSBody&#8217; and namespace-uri()=”]/*[local-name()=’BACSRemittance’ and namespace-uri()=”]/*[local-name()=’Remittance’ and namespace-uri()=”]/*[local-name()=’RemittanceDetail’ and namespace-uri()=”][” + System.Convert.ToString(nLoopCount) + “]”);

vXmlNode = vXmlNodeList.Item(0);

MyVar = MyVar + vXmlNode.InnerText;

Decide Shape

If Branch rule (nMessageCount == 30)

Expression shape (logic for batching message)

Do something here to construct your batch message with myVar

nMessageCount = 0;

myVar = “”;

Expression shape (Add counters)

nLoopCount = nLoopCount + 1;

nMessageCount = nMessageCount + 1;

End of Loop

Expression shape (logic for batching rest of message)

Do something here to construct your batch message with myVar

Any mistakes ?

Grant

 

 

 

[/quote]