1

After upgrading codeeffects from 4.3.2.6 to 4.3.6.7 existing rules that have any coded actions or methods fail to load with the error:

"The highlighted rule elements could not be located in the current source object. Please update this rule or roll back all changes made to the source object."

Followed by the following in the rules editor

Rule Editor Error

How can this be overcome?

Prior to the upgrade the rules threw no errors and acted against the data as expected. The errors and the XML below come from the downloaded demo. After updating the demo I encountered the same issues.

The XML for the rule:

<?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>

I've tried updating the webrule="4.1.6.4" value in the XML to match the new version without success.

Iain
  • 45
  • 6

1 Answers1

1

First, please check that your project actually declares the "missing" method. Then post your rule XML here, at least its portion that uses that method if the entire rule is too large.

Alex
  • 566
  • 1
  • 6
  • 14
  • Have added the XML to the original post. On further investigation although the external method is declared ( [ExternalMethod(typeof(PatientService), "IsToday")] ) it seems to be ignored. – Iain Aug 23 '17 at 10:11
  • Got it, thanks. I'll take a look later today, will reply shortly. – Alex Aug 23 '17 at 15:10
  • Due to our recent move to a new data center, Code Effects Downloader was pointing to an invalid free build. Now it's fixed. Please download the updated free version and try your test again. Thank you for reporting this! Please mark our reply as "answered". – Alex Aug 23 '17 at 15:51
  • Downloaded from your site and now works fine. The NuGet download also needs updating as it still suffers the same issue. – Iain Aug 24 '17 at 06:59