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.
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ā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.
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.
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.