Record Count 펑토이드
Record Count 펑토이드는 입력 instance 메시지의 레코드 수를 계산합니다.
Record Count 펑토이드에는 하나의 입력과 하나의 출력이 있습니다. 입력은 소스 스키마의 반복 레코드에서 가져온 링크입니다. Record Count 펑토이드의 출력은 실제 입력 instance 메시지의 반복 레코드 수입니다.
반복 레코드는 입력 인스턴스 메시지에서 예측할 수 없는 횟수로 반복되는 요소를 나타냅니다. 예를 들어 구매 주문에서 Item 요소가 여러 번 발생할 수 있습니다. 또한 Item 요소에는 제품, 설명, 가격 및 수량이 포함될 수 있습니다. 다음 코드는 이러한 구매 주문서를 간단하게 보여 주는 예입니다.
<ns0:PurchaseOrder xmlns:ns0="http://RecordFunctoid.PurchaseOrder">
<From>Kevin F. Browne</From>
<To>Northwind Traders</To>
<LineItems>
<Item>
<Product>Laptop Computer</Product>
<Description>Thin profile laptop</Description>
<Price>1999.95</Price>
<Quantity>1</Quantity>
</Item>
<Item>
<Product>Monitor Swipes</Product>
<Description>Disposable monitor swipes</Description>
<Price>3.95</Price>
<Quantity>10</Quantity>
</Item>
</LineItems>
</ns0:PurchaseOrder>
Item 레코드의 Max Occurs 속성은 바인딩되지 않은 것으로 설정됩니다. 이는 Item 레코드가 루프되고 BizTalk Mapper가 이 레코드를 루프로 컴파일한다는 것을 나타냅니다.
구매 주문 입력 instance 메시지에서 총 Item 요소 수를 찾고 결과를 출력 instance 메시지의 필드에 배치하려는 경우를 가정해 보겠습니다.
다음 그림에서는 들어오는 구매 주문의 항목 수를 계산하고 SummedPO 출력 instance 메시지의 ItemCount 필드에 해당 값을 넣는 Record Count 펑토이드를 보여 줍니다.
Record Count 펑토이드 맵
Item 레코드의 Max Occurs 속성은 바인딩되지 않습니다. 이는 Item 레코드가 루프되고 BizTalk Mapper가 이 레코드를 루프로 컴파일한다는 것을 나타냅니다.
두 개의 Item 요소가 포함된 이전 샘플 구매 주문 instance 메시지의 경우 ItemCount 필드의 값이 2로 설정됩니다.
<ns0:SummedPO xmlns:ns0="http://RecordCountFunctoid.SummedPO">
<From>Kevin F. Browne</From>
<To>Northwind Traders</To>
<POTotal>2039.45</POTotal>
<ItemCount>2</ItemCount>
</ns0:SummedPO>
참고
또한 Record Count 펑토이드를 사용하여 반복 필드 요소를 계산할 수 있습니다. 이러한 계산이 레코드에 대해서만 수행되는 것은 아닙니다.
참고 항목
맵에 Record Count 펑토이드 추가 방법
고급 펑토이드
Index 펑토이드
Iteration 펑토이드
Looping 펑토이드