Code Effects 6.0 Release Candidate

Version 6 introduces a significant amount of new functionality. This article explains how to upgrade your existing project(s) from any earlier version of Code Effects to the Version 6.0 Release Candidate.

Some of the upgrade steps listed in this article are not relevant for customers who already upgraded to version 5.5 or later.

The purpose of this upgrade is to ensure that your existing rule management and rule evaluation functionality is ready for the final release of Version 6.0. DO NOT upgrade your production environment to this version.

What's New in Code Effects 6.0?

Please read the What's New in Version 6 article for a detailed overview of the new functionality, platform improvements, security enhancements, and API changes introduced in this version.

How to Upgrade to Version 6.0 Release Candidate

  1. Download the Version 6.0 RC package. The package includes the following files:

    • CodeEffects.Rule.Common.dll - This .NET assembly declares common types and functionality. It should be referenced in all .NET projects that use Code Effects.
    • CodeEffects.Rule.Editor.dll - This .NET assembly declares all types and functionality related to rule management. It should be referenced only in web projects that implement the rule editor.
    • CodeEffects.Rule.Engine.dll — This .NET assembly declares all types and functionality related to rule evaluation. It should be referenced only in projects that implement the rules engine.
    • codeeffects.editor.js — This JavaScript file declares the main client-side functionality of the rule editor. It should be referenced only in web projects that implement the rule editor.
    • codeeffects.common.css — This CSS file declares the common styles of the rule editor. It should be referenced only in web projects that implement the rule editor.
    • codeeffects.light.css — This CSS file declares the styles of the rule editor's light theme. It should be referenced only in web projects that implement the rule editor.
  2. Remove all references to existing Code Effects .NET assemblies from all projects that use the Code Effects platform.

  3. If applicable, uninstall the existing Code Effects npm package.

  4. If applicable, remove the existing Code Effects editor script reference from your project's HTML.

  5. If applicable, remove all existing Code Effects CSS references from your project's HTML.

  6. Reference the new Code Effects .NET assemblies from the package in your projects. If necessary, both the engine and editor assemblies can be referenced within the same project.

  7. In web projects that use client-side frameworks such as React or Angular, import the Code Effects editor script from the package as a module. Refer to our demo projects for examples. In traditional web applications such as ASP.NET, reference the editor script from the package in your HTML as a module using the type="module" attribute:

     <script type="module" src="/scripts/codeeffects.editor.js"></script>
    
  8. Reference the codeeffects.common.css and codeeffects.light.css CSS files from the package in your HTML.

  9. Build the project to generate the list of compilation errors.

  10. Update the using directives that reference Code Effects namespaces in all .NET files as follows: In projects that implement rule management using the editor, replace the following directives:

     using CodeEffects.Rule.Asp;
     using CodeEffects.Rule.Mvc;
     using CodeEffects.Rule.Core;
     using CodeEffects.Rule.Web;
     using CodeEffects.Rule.Common;
    

    with:

     using CodeEffects.Rule.Common.Models;
     using CodeEffects.Rule.Editor;
     using CodeEffects.Rule.Editor.Models;
     using CodeEffects.Rule.Editor.Client;
    

    Replace the following directive:

     using CodeEffects.Rule.Attributes;
    

    with:

     using CodeEffects.Rule.Common.Attributes;
    

    In projects that implement rule evaluation using the engine, replace the following directives:

     using CodeEffects.Rule.Common;
     using CodeEffects.Rule.Core;
    

    with:

     using CodeEffects.Rule.Common.Models;
     using CodeEffects.Rule.Engine;
    

    Some using directives may become unused after these changes. Simply remove them.

  11. The main editor .NET class RuleEditor has been renamed to Control and moved to the CodeEffects.Rule.Editor namespace. Some of its functionality has also been deprecated or renamed:

    • Rename all references to the old CodeEffects.Rule.Web.RuleEditor class to CodeEffects.Rule.Editor.Control.
    • Replace any calls to obsolete members of the new Control class with the members recommended by their ObsoleteAttribute. Most deprecated members are public methods of the old RuleEditor class that were renamed in the Control class. All deprecated members will continue to work, even if you do not replace them immediately, until the next major version in which we plan to remove them.
  12. Some functionality of the RuleModel class has either been moved to the Control class or deprecated. Starting with Version 6.0, the RuleModel class itself will play a much smaller role:

    • Replace any invocations of the RuleModel.GetRuleXml() public method with Control.GetRuleXml(). For example, replace yourEditor.Rule.GetRuleXml() with yourEditor.GetRuleXml().
    • Replace any calls to obsolete members of RuleModel with the members recommended by their ObsoleteAttribute.
  13. In your client-side script that initializes the rule editor, replace the following:

    • Replace calls to the yourEditor.setClientActions() public function with the new yourEditor.setCallbacks() function while keeping all parameters the same.

Contact us if you have any questions or require further assistance.

Ask on Stack Overflow - Yes, it's still active
Ask in GitHub Discussions

p102

l097 --

l102

p101

×