by default, WM studio generates the rule for commit as below.
not(/mvc:eForm/mvc :D ata//sql_result/statement/status[@outcome = 'fail'])
I think that it should be
not(/mvc:eForm/mvc :D ata/sql_result/statement/status[@outcome = 'fail'])
because XML structure will look like as below
<eForm xmlns="http://www.hyfinity.com/mvc">
<Data>
<sql_result xmlns="">
<statement>
<status outcome="fail">
My WM Studion version: 3.1.2.00002
Thanks,
Taeho
not(/mvc:eForm/mvc :D ata//sql_result/statement/status[@outcome = 'fail'])
I think that it should be
not(/mvc:eForm/mvc :D ata/sql_result/statement/status[@outcome = 'fail'])
because XML structure will look like as below
<eForm xmlns="http://www.hyfinity.com/mvc">
<Data>
<sql_result xmlns="">
<statement>
<status outcome="fail">
My WM Studion version: 3.1.2.00002
Thanks,
Taeho
RE: Is the auto-generated database commit rule correct?
The reason the generated XPath contains the // is because in some situations the sql_result element may not be directly under the Data tag.
For example if you have selected the 'Edit multiple records' usage option, then you will end up with a number of sql_result fragments within a container tag.
The generated XPath is trying to make sure that the data will only be committed if there weren't any failures, regardless of where in the data the result is being placed.
You can of course edit the generated rule for your project if you want to.
If you know that the sql_result fragments will always be directly under Data then you can make the change you mention, and it may well help performance slightly as it is a simpler XPath to evaluate.
You may also have scenarios where you do not want certain failures to prevent others from being committed, so again you could edit the rule conditions accordingly.
I hope this makes sense :)