CodeEffects - 升级后的现有规则错误

时间:2017-08-22 16:29:36

标签: rule-engine business-rules codeeffects

将代码效果从4.3.2.6升级到4.3.6.7后,任何编码操作或方法的现有规则都无法加载错误:

" 突出显示的规则元素无法在当前源对象中找到。请更新此规则或回滚对源对象所做的所有更改。"

在规则编辑器中跟随以下内容

Rule Editor Error

如何克服这个问题?

在升级之前,规则没有出现任何错误,并按预期对数据采取行动。 下面的错误和XML来自下载的演示。更新演示后,我遇到了同样的问题。

规则的XML:

<?xml version="1.0" encoding="utf-8"?>
<codeeffects xmlns="http://codeeffects.com/schemas/rule/41" xmlns:ui="http://codeeffects.com/schemas/ui/4">
  <rule id="2eb43e80-320c-496f-bf50-7ead12bae886" webrule="4.1.6.4" utc="2014-08-05T15:29:26.3909" type="CodeEffects.Rule.Demo.Bre.Mvc.Models.Patient, CodeEffects.Rule.Demo.Bre.Mvc.2013, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" eval="true">
    <name>Check Date</name>
    <definition>
      <condition type="equal">
        <method name="IsToday" type="CodeEffects.Rule.Demo.Bre.Mvc.Services.PatientService, CodeEffects.Rule.Demo.Bre.Mvc.2013, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
          <value type="System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]">2014-08-06T00:00:00.0000</value>
        </method>
        <value type="System.Boolean">true</value>
      </condition>
    </definition>
    <format>
      <lines />
    </format>
  </rule>
</codeeffects>

我已尝试更新webrule =&#34; 4.1.6.4&#34; XML中的值与新版本匹配但没有成功。

1 个答案:

答案 0 :(得分:1)

首先,请检查您的项目是否确实声明了&#34;缺少&#34;方法。然后在此处发布您的规则XML,至少在整个规则太大的情况下使用该方法的部分。