Hallo,
leider habe ich die rule bereits gelöscht. Aber das Problem ergibt sich auch mit einer dsl wie
Code: Alles auswählen
import java.util.List
import java.util.ArrayList
import java.util.HashMap
var List <HashMap <String, String>> irgendwas = new ArrayList ()
Ich erhalte die gleichen Fehler in der log, nachdem ich 'run script' geklickt habe:
2022-01-23 08:53:41.091 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID '822ed374f0' failed: ___ import ___ java.util.List
import java.util.Array ___ List
import java.util.HashMap
var List <HashMap <String, String>> irgendwas = new ArrayList ()
1. List cannot be resolved to a type.; line 5, column 79, length 4
2.
The method or field import is undefined; line 1, column 0, length 6
3. The method or field import is undefined; line 2, column 22, length 6
4. The method or field import is undefined; line 3, column 49, length 6
5. ArrayList cannot be resolved.; line 5, column 126, length 9
6. HashMap cannot be resolved to a type.; line 5, column 85, length 7
7. This expression is not allowed in this context, since it doesn't cause any side effects.; line 1, column 7, length 14
8. This expression is not allowed in this context, since it doesn't cause any side effects.; line 2, column 29, length 19
9. This expression is not allowed in this context, since it doesn't cause any side effects.; line 3, column 56, length 17
Das funktioniert in openHab 2.5 und 3.2 (auch erste Versuche!) rules-Datei. Gleiche Meldung erhielt ich bei meinen Versuchen wegen der Kalenderwoche mit LocalDate und ein import von WeekFields usf.. 'import' war undefined und ohne gab es auch Fehler. Eine Lösung würde mich freuen!