0

We have CodeEffects rule editor embedded into MVC View.

The editor is working well when editing a rule, but from time to time the editor RuleModel object is not instantiated/bound in action controller on server side upon submit (Null reference exception). Our code is as follows:

In View:

<div class="clear" style="margin-top: 20px">
    @{
         Html.CodeEffects().RuleEditor()
         .Id("ruleEditor")
         .ShowToolBar(false)
         .Rule(Model.Rule)
         .Mode(RuleType.Evaluation)
         .Render();
    }
</div>

In Controller:

public ActionResult UpdateRuleSet(CreateRuleSetModel model, RuleModel ruleEditor, RuleModel ruleEditorExceptions, string submit, FormCollection form)
{
    //ruleEditor object is null (not being properly bound from form?)
    //ruleEditorExceptions model is instantiated properly
    ...
}

We're having trouble reproducing this error as it only occurs on some server systems and not others (some test environments and also production in one instance - never occurred locally). The complexity of rule has no merit on the issue (can be simple rule).

What is strange is that application pool recycling ceases the issue and editor starts working again (on same rules that previously broke the application). Also a rule can break application on one client (browser) while other browser can save the same rule without issue (at the same time).

For now we're suspecting client side (form submission) but cannot confirm (and pool recycling workaround just adds to the mystery).

We use CodeEffects.Rule.dll version 4.1.2.6. (on .NET 4.0 framework).

Any guidance (other than CE update) is much appreciated.

Gezilein
  • 1
  • 1
  • May I ask why you hesitate of updating your assembly to the latest version? This update is free, it implements fixes for several reported bugs as well as some new features. – Alex Jul 18 '16 at 16:23
  • We hesitate because As far as it can be read from your website the upgrade is not free? Are we misreading? Can you please provide specifics and procedure of the upgrade? – Gezilein Jul 19 '16 at 06:51
  • 1
    Any minor update to the same major version is always free. You have version 4.1.2.6. The current version is 4.3.0.2. Use [our Downloader](http://codeeffects.com/Doc/Business-Rule-Engine-Downloader) and your product key to obtain and install the latest version. It'll be free for you. – Alex Jul 19 '16 at 22:37
  • Thank you. Will give that a go. – Gezilein Jul 20 '16 at 04:40

1 Answers1

0

Your HTML and MVC action signature are fine. Because of the nature of the issue, its description is quite broad. I've never heard of anything like that. There are installations of CodeEffects out there that handle dozens of thousands of rules without issues. We need more details to help you. Obviously, any logs, stack or exception info would help.

Alex
  • 566
  • 1
  • 6
  • 14
  • Agreed, but there aren't any exceptions other than the ones that are caused by missing object later in action handling - the model is simply empty. – Gezilein Jul 19 '16 at 06:53
  • There's a way but since it's remote environment we're not quite there yet. Locally error is not present. – Gezilein Jul 20 '16 at 04:41