Monday, April 4, 2016

Word Casing check in BizTalk BRE

I got one reuirement where in I will have any case type of word as an input and i have to put if condition on that word in BizTalk BRE.


Problem : from input schema element value can be come in any casing format(Upper case, Lower case, Camel case)

input schema element should be checked using the BizTalk BRE if statment

Solution : Out of box BizTalk supports Match predicate which checks the elements with regular experssion matches with the left hand oprand.

Predicate : Match

Regular Expression : (?i)vikas\b


Input Schema :

<ns0:PO xmlns:ns0="http://POSchemas.PO">
<POName>vikas</POName>
<PONum>PO_12</PONum>
<POAmount>0</POAmount>
<PODate>2011-01-01</PODate>
<Items>
<ItemName>Screw</ItemName>
<ItemQty>5</ItemQty>
<UnitPrice>2.1</UnitPrice>
<ItemSum>1.2</ItemSum>
</Items>
</ns0:PO>


Test Result :

CONDITION EVALUATION TEST (MATCH) 4/4/2016 4:10:11 AM
Rule Engine Instance Identifier: 5d772604-6224-4e40-8455-656f09ab4807
Ruleset Name: LowerCaseCheck
Test Expression: True == Match(TypedXmlDocument:POSchemas.PO:/PO.POName, (?i)vikas\b)
Left Operand Value: True
Right Operand Value: True
Test Result: True

Hope this will Helps!!!!


Regards,

No comments:

Post a Comment