AnsweredAssumed Answered

Explain Business Rule Results. Bug?

Question asked by DarrellFlenniken9941 on Apr 25, 2018
Latest reply on May 9, 2018 by DarrellFlenniken9941

I have business rule that checks the following XML profile/data 


      <Test TestCode="BBBBB" TestName="XXXXX" TestID="0"/> 
      <Test TestCode="YYYYY" TestName="YYYYY" TestID="0"/> 



It checks that TestCode != "BBBBB" in <Test TestCode="BBBBB" TestName="XXXXX" TestID="0"/> 


This check fails as expected producing rule failure message 
<business_rule_failure rule="New Business Rule">Error: BBBBB XXXXX</business_rule_failure> 


The check for TestCode != "BBBBB" in <Test TestCode="YYYYY" TestName="YYYYY" TestID="0"/> 


This also fails which is not expected producing rule failure notice 
<business_rule_failure rule="New Business Rule">Error: BBBBB YYYYY</business_rule_failure> 


I think this is a bug. If not, please explain  and provide the proper technique to prevent the false failure.


This was reported to support who suggested  that I split the document into two document on @TestCode (Outer/TestOrder/Test/@TestCode)  prior to  the Rule shape. This is an unacceptable solution, this is single document. So part of my document, after the split, fails and part succeeds! This also begs the question of why the rule didn't work as expected, or how an arbitrary number of elements would be handled. E.g. what if I had 50  <Test TestCode="YYYYY" TestName="YYYYY" TestID="0"/>  elements?