Hi.
After al long time I have started migrating to version 2.5 / 2.6.
Installed Java 1.8 and migrated my 100 devices and many panels.
The migration causes many issues with rules but this one I really do not understand.
I got the following error:
ERROR 2018-02-19 12:19:34,414 : Rule definition ‘modeler_rules_wt.drl’ could not be deployed. See errors below.
ERROR [main]: Rule definition ‘modeler_rules_wt.drl’ could not be deployed. See errors below.
ERROR 2018-02-19 12:19:34,414 : [ERR 102] Line 263:4 mismatched input ‘modify’ in rule “5_Panel_Water_Activated_Manually_60_Minutes”
ERROR [main]: [ERR 102] Line 263:4 mismatched input ‘modify’ in rule “5_Panel_Water_Activated_Manually_60_Minutes”
ERROR 2018-02-19 12:19:34,415 : Parser returned a null Package
ERROR [main]: Parser returned a null Package
INFO 2018-02-19 12:19:37,047 : Added rule definition ‘modeler_rules.drl’ to knowledge.
Here is the rule after replacing the “modify” with “update” operation:
rule “5_Panel_Water_Activated_Manually_60_Minutes”
no-loop true
duration 1500
when
$wt_timer : Water_Tank_Timer()
eval ($wt_timer.getTime_running() == 0)
eval ( $wt_timer.getLock_handler() == 0 )
Switch ( source == “V_Water_Tank_60M (Sensor)”, value == “ON” )
eval ( $wt_timer.getProc_id() == 99 )
then
/*
$wt_factors.setTime_running(1);
$wt_factors.setLock_handler(1);
$wt_factors.setProc_id(0);
update ( $wt_timer );
modify($wt_timer)
{
setTime_running(1);
}
modify($wt_timer)
{
setLock_handler(1);
}
modify($wt_timer)
{
setProc_id(0);
}
*/
System.out.println ( _TimeStamp()+ ": #5 Water Tank 60 Minutes button was turned ON !! ");
The error remains the same as is I did not put it in remark.
As you can see although there is an error, the rule runs as I get tall initialisation messages.
I manipulate the rules directly on the controller itself (editing the rule file and re-run the OR).
I use MACOS 10.13.4 in a MACMini
I rebooted the MAC, I have opened a new terminal yet nothing helps.
I have seen this in version 2.5 as well where only boot brings the new rules properly but here I edit the file itself in the rules folder.
Hope someone can help.