any idea?
Rule Compilation error : [Rule name='check sev']
drools/cookbook/Rule_check_
sev_0.java (14:699) : $ticket.totalCount cannot be resolved to a type
drools/cookbook/Rule_check_sev_0.java (16:796) : $ticket cannot be resolved
Rule Compilation error : [Rule name='check sev']
drools/cookbook/Rule_check_sev_0.java (14:699) : $ticket.totalCount cannot be resolved to a type
drools/cookbook/Rule_check_sev_0.java (16:796) : $ticket cannot be resolved
package drools.cookbook;
import drools.cookbook.model.Ticket
declare Ticket
@role(event)
end
rule "check sev"
when
accumulate( $ticket : Ticket() over window:time(5m) from entry-point "csupport", $num : count( $ticket ))
then
$ticket.totalCount = $num;
System.out.println("num = " + $num);
update($ticket);
end
rule "alert sev"
when
Ticket(totalCount == 10)
then
System.out.println("ALERT ALERT!!!");
end
*********************************************
package drools.cookbook.model;
public class Ticket {
public int totalCount;
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
public int times;
public int getTimes() {
return times;
}
public void setTimes(int times) {
this.times = times;
}
public String sev;
public String getSev() {
return sev;
}
public void setSev(String sev) {
this.sev = sev;
}
}