RM: can't edit rule due to: Error: Cannot get property 'cond' on null object

I'm updating a rule and I get the following error when I click on the actions/conditions section. So now it's impossible to edit actions, conditions, or local variables.

java.lang.NullPointerException: Cannot get property 'cond' on null object on line 2972 (method selectActions)

Platform is 2.3.4.119.

Tried reboot, stop/resume rule, and even export/import of the rule. The last thing I did was add a IF statement to a conditional of checking if a decimal is greater than 0.
2022-12-11 13_34_32-manager charger robert import
Note that the above END-IF is not meant to end the new IF line but I can't edit the rule to add another END-IF.

RM seems rather fragile.

RM’s stability keeps improving, but there are times where it can still become unstable, especially if using the back button.

When something similar has happened to me, I found that unless the rule is extremely complexe (and sometimes even in those cases…), the best approach is to re-create the rule from scratch.

2 Likes

The rule is almost 80 lines long, but I do have a recent export from today when I got a different error. Is the mere length of a rule a problem? Seems like every click takes a few seconds.

For the curious, the rule calculates the charging rate of a phone and then uses that to calculate how long it would take to charge to a specific percentage and then shuts off the charger at that time. The readings from the phones are not frequent enough and I often find them charging above what I want, so I want to add some intelligence to the rule.

1 Like

Probably not. If you would email me that export you made I could look into it. Meanwhile, I will look into the error.

Did you do a copy/paste?

I don't think I did a copy/paste for the last error but I may have for the previous error, which was:
error: no signature of method: java.lang.string.call() is applicable for argument types: (java.lang.integer) values: [19] possible solutions: take(int), wait(), any(), wait(long), wait(long, int), charat(int)

The import allows for editing so I try to replicate my steps since that version.

It is possible to push beyond the intended use envelope for Rule Machine, and this does that. This sort of thing should be done in Groovy with a custom app. While RM is a generalized rule engine, it is not intended to be a replacement for writing code. Groovy is not difficult to learn.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.