Hello Drools users
Given the following simple test rule:
rule "test rule 1"
when
$e : Event();
not( Event(id == $e.id && this after[0s,10s] $e ) )
then
System.out.println("Hello");
end
placed in Guvnor and the following simple test project:
ruleagent.properties:
url=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST
TestRuleAgent.java:
RuleAgent agent = RuleAgent.newRuleAgent("/ruleagent.properties");
RuleBase rb = agent.getRuleBase();
throws the following exception:
Exception in thread "main" org.drools.RuntimeDroolsException: unable to
determine operator for symbol [after]
at org.drools.base.evaluators.Operator.determineOperator(Operator.java:71)
at org.drools.base.evaluators.Operator.readResolve(Operator.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1061)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1762)
[cut objectinputstream lines]
at org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:189)
at org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:158)
at org.drools.agent.HttpClientImpl.fetchPackage(HttpClientImpl.java:50)
at org.drools.agent.URLScanner.readPackage(URLScanner.java:148)
at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:120)
at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:96)
at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:410)
at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:362)
at org.drools.agent.RuleAgent.configure(RuleAgent.java:347)
at org.drools.agent.RuleAgent.init(RuleAgent.java:247)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:187)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:147)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256)
at ruleagent.RuleAgentTest.main(RuleAgentTest.java:16)
any ideas to what I am doing wrong here?
Thanks
Michael