(no subject)
by Post Office
Dear user rules-users(a)lists.jboss.org, administration of lists.jboss.org would like to inform you that:
Your account was used to send a huge amount of spam messages during the recent week.
Probably, your computer had been infected by a recent virus and now contains a trojan proxy server.
Please follow our instructions in order to keep your computer safe.
Best regards,
The lists.jboss.org support team.
14 years, 11 months
CEP fusion
by chris richmond
Hello,
I have this test rule that basically fires if a followup reading is not
received with the appropriate value within some time. According to the
fusion docs, simply using:
*not*( FollowUpReading(value == $val, *this* before[0s,5s] $reading ) )
should wait 5 seconds before firing, however this does not work unless I
explicitly also set:
*duration*( 5s )
and if I do that, it seems to wait the 5 seconds, however it always follows
what I put in the duration value and seems to compeltely ignore the time
tolerances I use here.:
$reading : DatarReading($val: value)
*not*( FollowUpReading(value == $val, *this* before[0s,5s] $reading ) )
And if I have different values, it will fire the rule after 2 seconds and
ignore the 5s in the sample below.
Any ideas?
*
rule* "my rule"
*duration*( 2s )
*when
*
$reading : DatarReading($val: value)
*not*( FollowUpReading(value == $val, *this* before[0s,5s] $reading ) )
*then*
System.err.println("did not receive follow up - reading value: " + $val);
*
end
*
14 years, 11 months
Can we use 'from' CE in Decision Tables ?
by groovenarula
Hello all,
Is it possible to define the follow rule in a decision table :
rule "Activate Promotion"
when
l : Line( )
not ( Promotion ( code == "HOTBUY" ) from l.promos )
then
#do some action
end
The rule above works perfectly for what I need when defined in a rule file.
However, when I try to define it in a decision table so that the 'code' can
be feed from a spreadsheet, I use the following values in the rules cells :
RuleTable
HOTBUYS
CONDITION
ACTION
l : Line
not ( Promotion ( code == "$param" ) from l.promos )
System.out.println("$param added");
PROMOTION
PROMOTION
HOTBUY
BESTBUY
I'm getting the following parser errors
[10,17]: [ERR 101] Line 10:17 no viable alternative at input 'Promotion' in
rule "_11" in pattern Line
[10,29]: [ERR 101] Line 10:29 no viable alternative at input 'code' in rule
"_11"
[10,63]: [ERR 102] Line 10:63 mismatched input ')' expecting 'then' in rule
"_11"
java.lang.IllegalArgumentException: Could not parse knowledge.
at
com.sample.DecisionTableTest.readKnowledgeBase(DecisionTableTest.java:85)
at com.sample.DecisionTableTest.main(DecisionTableTest.java:28)
Also in Eclipse IDE, I get the following error :
"Unknown error while parsing. This is a bug. Please contact the Development
team." NewPromotions.xls
Is it possible to use 'from' conditional element in decision tables ? If so,
what am I doing wrong. If not, then what's the best approach to implement
the rule above in a decision table.
I'm running Drools 5.1.0M1 in Eclipse.
Help truly appreciated.
Gurvinder
--
View this message in context: http://n3.nabble.com/Can-we-use-from-CE-in-Decision-Tables-tp67005p67005....
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 11 months
Trivial rule with condition in RHS won't compile, help please
by Barry Kaplan
The following rule:
rule "test" dialect "mvel"
when
eval(true)
then
if (true) {
System.out.println("***")
}
end
Fails with:
java.lang.RuntimeException: Unable to build expression for 'consequence':
was expecting type: java.lang.Object; but found type: void ' if (true) {
System.out.println("***")
}
true
' : [Rule name='test']
I can't for the live of me figure out what mvel is bitching about.
Note that the following does compile:
rule "test" dialect "mvel"
when
eval(true)
then
// if (true) {
System.out.println("***")
// }
end
--
View this message in context: http://n3.nabble.com/Trivial-rule-with-condition-in-RHS-won-t-compile-hel...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 11 months
CEP + prevent consequences from triggering multiple times?
by reverselogic
Hi,
I'm trying to write a rule in drools, which triggers once some condition is
active for a specified time interval. For example, if a vehicle is over a
speed limit (100 mph) for 30 seconds, I want to trigger an action. However,
once this rule has fired, I don't want it to fire again until the vehicle
has dropped below the speed limit (and gone over the limit again). The only
way I've managed to model this is by defining two rules; one for determining
when the vehicle is speeding and one for determining when it is not speeding
and using a global object to track the state of the vehicle (see rules
below).
rule "OverSpeedLimit" no-loop true
when
$minSpeed : Double() from accumulate(
$speedingEvent : SpeedingEvent ($speed : speed)
over window:time( 30s )
from entry-point SpeedingStream,
min($speed)
);
eval ($minSpeed > 100.0 && !state.speeding)
then
state.speeding = true
end
rule "!OverSpeedLimit" no-loop true
when
$speedingEvent : SpeedingEvent()
from entry-point SpeedingStream
eval ($speedingEvent.speed <= 100.0)
then
state.speeding = false
end
My questions is: Is there a better way to model the above behaviour,
preferably as a single rule? The reason I ask is because I believe it would
be too complicated for my users to define rules like this. Ideally, I would
like to be able to create a DSL such as: "when Speed is above X for Y
seconds then ..."
Any help greatly appreciated.
Thanks,
Paul
--
View this message in context: http://n3.nabble.com/CEP-prevent-consequences-from-triggering-multiple-ti...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 11 months
unable to resolve Type Declaration class
by richarda
So, my code is doing this:
KnowledgeBaseConfiguration conf =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
conf.setOption(EventProcessingOption.STREAM);
KnowledgeBuilder builder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
try {
File f = new File("/tmp/my.pkg");
InputStream stream = new FileInputStream(f);
if (stream == null) {
jlog.fatal("Unable to find rule pkg");
} else {
jlog.info("adding pkg");
builder.add(ResourceFactory.newInputStreamResource(stream),
ResourceType.PKG);
}
} catch (Exception e) {
e.printStackTrace();
}
KnowledgeBase kbase =
KnowledgeBaseFactory.newKnowledgeBase(conf);
kbase.addKnowledgePackages(builder.getKnowledgePackages());
jlog.info("setup creating knowledge session");
ksession = kbase.newStatefulKnowledgeSession();
jlog.info(" setup ksession created");
The pkg was created from Guvnor.
If in the package declaration area in Guvnor, (where you put the import
statements)
If I put
declare Signature
@role ( event )
end
then build the package, save it to disk /tmp/my.pkg
on startup I get:
[#|2009-11-24T14:50:38.944+0000|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=12;_ThreadName=pool-1-thread-3;_RequestID=7c35064d-757e-4519-b5eb-433db89e168d;|org.drools.RuntimeDroolsException:
unable to resolve Type Declaration class 'Signature'
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:754)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:515)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)
I need to declare 'Signature' as an 'event'
Am I doing this wrong?
If I do this all in Eclipse and load the DRL files manually it all works.
--
View this message in context: http://old.nabble.com/unable-to-resolve-Type-Declaration-class-tp26497326...
Sent from the drools - user mailing list archive at Nabble.com.
14 years, 11 months
Eclipse plugin with latest Galileo
by chris richmond
Is anyone successfully using the IDE plugin with the latest Galileo version
of Eclipse. I cannot get it to debug using Galileo(my previous post
concerning debug as) I tested instlaling the IDE plugin by using the IDE
update site link on the following versions. I normally use the Galileo, but
tried the other for troubleshooting this....
Galileo standard
Galileo EE
Ganymede Standard
The plugin appears to install just fine with all three, and the
DroolsTest.java that is added when I create a new Drools project runs fine
in all three. However, I am only able to debug as Drools application using
Ganymede. So is it simply not possible to use the IDE update link with
the latest Eclipse(Galileo)?
Thanks,
Chris
14 years, 11 months
Regarding Drools Rules Engine
by Anupindi RaviShankar
Hi All,
We are evaluating Drools rules engine for one of the clients. The client has
given some parameters based on which evaluation needs to be done.
We were not able to get this information from Drools site. So need your help
in getting this information.
• Number of transactions Drools Engine can support. Can it support around
1-1.5 million transactions.
• How can we introduce enforcement levels, overriding authority etc.?
• How can the controlling class get to know which rule was fired and which
was overridden ?
• Does the rule engine support the tracking of different rule types?
Can you please provide your updates on the same.
Thanks
Ravi
14 years, 11 months
Error in the USER TASK work handler
by ramram
Hi all
I have a problem with the User Task work Item when I have an in and out
parameters. I am using a simple scenario just to reproduce the Error and
exception and the scenario is:
Start -> user task with parameter (in, out) -> End
I am having the following exception once I execute the Task:
ERROR [STDERR] java.lang.NullPointerException
ERROR [STDERR] at
org.drools.marshalling.impl.MarshallerReaderContext.resolveClass(MarshallerReaderContext.java:78)
ERROR [STDERR] at java.io.ObjectInputStream.readNonProxyDesc(Unknown
Source)
ERROR [STDERR] at java.io.ObjectInputStream.readClassDesc(Unknown
Source)
ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(Unknown
Source)
ERROR [STDERR] at java.io.ObjectInputStream.readObject0(Unknown Source)
ERROR [STDERR] at java.io.ObjectInputStream.readObject(Unknown Source)
ERROR [STDERR] at
org.drools.marshalling.impl.InputMarshaller.readWorkItem(InputMarshaller.java:829)
ERROR [STDERR] at
org.drools.persistence.processinstance.WorkItemInfo.getWorkItem(WorkItemInfo.java:86)
ERROR [STDERR] at
org.drools.persistence.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:90)
ERROR [STDERR] at
org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:46)
ERROR [STDERR] at
org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:12)
ERROR [STDERR] at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:254)
ERROR [STDERR] at
org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:118
ERROR [STDERR] at
org.drools.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetResultContentResponseHandler.execute(CommandBasedWSHumanTa
va:297)
ERROR [STDERR] at
org.drools.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:139)
ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:752)
ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:414)
ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:49)
ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:832)
ERROR [STDERR] at
org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:379)
ERROR [STDERR] at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:173)
ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:414)
ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:49)
ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:832)
ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$HeadFilter.messageReceived(DefaultIoFilterChain.java:616)
ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:414)
ERROR [STDERR] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:408)
ERROR [STDERR] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:578)
ERROR [STDERR] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:540)
ERROR [STDERR] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:532)
ERROR [STDERR] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:58)
ERROR [STDERR] at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Worker.run(AbstractPollingIoProcessor.java:857)
ERROR [STDERR] at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
ERROR [STDERR] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
ERROR [STDERR] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
INFO [STDOUT] [2009:12:337 09:12:671:exception] Uncaught exception on
client
INFO [STDOUT] java.lang.RuntimeException: Could not rollback transaction
INFO [STDOUT] at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:283)
INFO [STDOUT] at
org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:118
INFO [STDOUT] at
org.drools.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetResultContentResponseHandler.execute(CommandBasedWSHumanTa
va:297)
INFO [STDOUT] at
org.drools.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:139)
INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:752)
INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:414)
INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:49)
INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:832)
INFO [STDOUT] at
org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:379)
INFO [STDOUT] at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:173)
INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:414)
INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:49)
INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:832)
INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain$HeadFilter.messageReceived(DefaultIoFilterChain.java:616)
INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:414)
INFO [STDOUT] at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:408)
INFO [STDOUT] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:578)
INFO [STDOUT] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:540)
INFO [STDOUT] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:532)
INFO [STDOUT] at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:58)
INFO [STDOUT] at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Worker.run(AbstractPollingIoProcessor.java:857)
INFO [STDOUT] at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
INFO [STDOUT] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
INFO [STDOUT] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO [STDOUT] at java.lang.Thread.run(Unknown Source)
INFO [STDOUT] Caused by: java.lang.RuntimeException: Could not execute
command
INFO [STDOUT] at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:280)
INFO [STDOUT] ... 24 more
INFO [STDOUT] Caused by: java.lang.NullPointerException
INFO [STDOUT] at
org.drools.marshalling.impl.MarshallerReaderContext.resolveClass(MarshallerReaderContext.java:78)
INFO [STDOUT] at java.io.ObjectInputStream.readNonProxyDesc(Unknown
Source)
INFO [STDOUT] at java.io.ObjectInputStream.readClassDesc(Unknown
Source)
INFO [STDOUT] at java.io.ObjectInputStream.readOrdinaryObject(Unknown
Source)
INFO [STDOUT] at java.io.ObjectInputStream.readObject0(Unknown Source)
INFO [STDOUT] at java.io.ObjectInputStream.readObject(Unknown Source)
INFO [STDOUT] at
org.drools.marshalling.impl.InputMarshaller.readWorkItem(InputMarshaller.java:829)
INFO [STDOUT] at
org.drools.persistence.processinstance.WorkItemInfo.getWorkItem(WorkItemInfo.java:86)
INFO [STDOUT] at
org.drools.persistence.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:90)
INFO [STDOUT] at
org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:46)
INFO [STDOUT] at
org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:12)
INFO [STDOUT] at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:254)
INFO [STDOUT] ... 24 more
Regards
Ram
--
View this message in context: http://n3.nabble.com/Error-in-the-USER-TASK-work-handler-tp67037p67037.html
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 11 months