0

Version 5.0.21.6 introduced a breaking change to the rule XML content.

In version 5.0.20.6 methods are referenced by their names in the XML file as shown below:

<method name="AddReason"><value type="System.Int32">1</value></method>

But in version 5.0.21.6 methods are referenced by a "token" as shown below:

<method name="1064B76D73CE9F304CA588DF55C65438"><value type="System.Int32">1</value></method>

We do use the XML document to further validate rules provided by the user and v5.0.21.6 breaks our functionality due to this issue.

Complete v5.0.21.6 Rule XML:

<?xml version="1.0" encoding="utf-8"?>
<codeeffects xmlns="https://codeeffects.com/schemas/rule/41"
    xmlns:ui="https://codeeffects.com/schemas/ui/4">
    <rule id="c11fc9b9-f60b-4b50-ac65-f46fb5c21471" webrule="5.0.21.2" utc="2020-08-11T18:42:06.3444" type="RuleModel.PermissibilityRuleModel, Rules.CodeEffects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" eval="false">
        <name>__rule_name__</name>
        <definition>
            <if>
                <clause>
                    <or>
                        <and ui:block="true">
                            <condition type="equal">
                                <property name="PortfolioType" />
                                <value type="numeric">1</value>
                            </condition>
                            <condition type="equal">
                                <property name="IndependenceRestrictionStandard" />
                                <value type="numeric">1</value>
                            </condition>
                        </and>
                        <condition type="equal">
                            <property name="IndependenceRestrictionStandard" />
                            <value type="numeric">1</value>
                        </condition>
                    </or>
                </clause>
                <then>
                    <set>
                        <property name="PermissibilityStatus" />
                        <value type="numeric">1</value>
                    </set>
                    <method name="1064B76D73CE9F304CA588DF55C65438">
                        <value type="System.Int32">1</value>
                    </method>
                </then>
                <else>
                    <if>
                        <clause>
                            <condition type="equal">
                                <property name="IndependenceRestrictionStandard" />
                                <value type="numeric">1</value>
                            </condition>
                        </clause>
                        <then>
                            <method name="23434FBDF0B4243BC14729C5D1539E7D">
                                <value type="System.Int32">1</value>
                            </method>
                        </then>
                        <else>
                            <set>
                                <property name="PermissibilityStatus" />
                                <value type="numeric">1</value>
                            </set>
                            <method name="1064B76D73CE9F304CA588DF55C65438">
                                <value type="System.Int32">1</value>
                            </method>
                        </else>
                    </if>
                </else>
            </if>
        </definition>
        <format>
            <lines>
                <line index="0" tabs="1" />
                <line index="3" tabs="2" />
                <line index="9" tabs="2" />
                <line index="16" tabs="1" />
                <line index="19" tabs="1" />
                <line index="25" tabs="1" />
                <line index="28" tabs="2" />
                <line index="35" tabs="2" />
                <line index="42" tabs="0" />
                <line index="44" tabs="1" />
                <line index="49" tabs="1" />
                <line index="52" tabs="2" />
                <line index="58" tabs="0" />
                <line index="60" tabs="1" />
                <line index="66" tabs="1" />
            </lines>
        </format>
    </rule>
</codeeffects>
Wagner DosAnjos
  • 6,304
  • 1
  • 15
  • 29
  • Could you post the entire rule if it's not very large? – Alex Aug 11 '20 at 19:44
  • @Alex do you have an update on this issue? we cannot upgrade until this is addressed. – Wagner DosAnjos Sep 10 '20 at 18:12
  • Did you try to use the original (not "tokenized") rule with the latest version 5.0.24.8? – Alex Sep 16 '20 at 02:11
  • @Alex this is still an issue with the latest version 5.0.24.8. It's not an issue running the existing XML with human-readable method names, that works. The issue is with new XML generated by the editor, where the method names are tokenized. We inspect the XML to provide extra validations and the tokenized method names break our validation code. – Wagner DosAnjos Sep 23 '20 at 20:02

0 Answers0