How to catch two (or more) strictly sequential events
by Antonello Calabrò
Dear all,
I'm trying to develope a cep system using drools and java.
On my system, I instantiated the drools engine in Stream mode
and catch my events (called SimpleEvents and composed by (String id, Long
timestamp, String data)) correctly.
Now I'm trying to create a rule able to match simple pattern like A -> B or
A -> B -> C
Using the feature "after", I am able to know if eventB is preceded by a
eventA .. but this rule match even the pattern: A -> .....(events of any
kind different from B)... -> B
Question:
There's a way to know when (if) eventA is strictly followed by eventB ?
Thanks in advance ;)
--Antonello
15 years, 6 months
Subflow and Fault
by jschmied
Hi!
If I have a subflow without a exception hanlder and there is thrown a fault
inside, the exception handler of main process doesn't get the exception. The
main process goes on like the subprocess has finished orderly.
This is a bit surprising because the documentation says:
"Nesting of exception handlers is allowed; a node will always search for an
appropriate exception handler in its parent container."
- Is it right that the main process continous even a subprocess is broken?
(Could I use the Exit-Action to throw a fault when the subprocess is not
finished orderly?)
- Is it right that the exception doesn't go from the subprocess into the
mainprocess?
Thanks
Juergen
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Subflow-and-Fault-tp1...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months
OWL (2 RL) reasoning support
by Semweb Developer
Hi all,
as far as I know, Drools does not support a built-in ruleset for reasoning on
OWL (2 RL) in the form of triple-based rules.
Is there any custom approach towards this field with a publicly available
ruleset for Drools?
thanks.
15 years, 6 months
Hold the Beans!
by Donald Winston
I'm reviewing JBoss Rules (Drools) for an application I'm starting to build. It appears that the only way to assert facts is to use the insert(Object) method where the object is a bean using the proper naming conventions for it's properties. There also appears to be a way to use arbitrary objects using globals but do these end up in the fact base? It's disturbing to me that I have to create a bunch of classes whose sole purpose in life is to support the rule base. This is similar to using java server pages and having to create a bunch of classes just to support each page. That's why I don't use java server pages and use xsl transformations instead. I want to use my xml jdom document to represent my data and not have to create a bunch of beans. I can't seem to find anything in the api where I can assert facts without creating my own custom classes. There's no standard Fact class?
I've been also experimenting with Jess and it provides an easy way for me to do this. I just iterate through my jdom document and create Fact objects and assert them. I can then execute the rules and then iterate through the updated fact base using engine.listFacts() and update my jdom document. It couldn't be easier or more natural. Is there an analogous way to do this in Drools?
Thank you very much.
15 years, 6 months
Throwing exceptions from rules.
by tom
Hi,
I have a rule, which in "then section" has:
throw new java.lang.Exception("I cant get this message!");
I throw this exception, and I can get it using catch
(org.drools.runtime.rule.ConsequenceException e) {} in java. But when I try
to get message from exception "e", I get only rule's name:
rule: <rule name>
How can I throw exception with message that I want to have on java side?
I hope it is understandeble... :)
Thanks,
tom.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Throwing-exceptions-f...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months
Javax.persistence.EntityNotFoundException: No Task with ID 2 was found!
by Eugenio Abello
Hi, I am using drools flow 5.1, and occurr the next problem.
I start OK task 2:
client.start( 2, a_user, responseHandler);
responseHandler.waitTillDone(3000);
But when complete task 2:
client.complete(2, "user", null, responseHandler);
responseHandler.waitTillDone(000);
Hibernate: select task0_.id as id284_3_, task0_.allowedToDelegate as
allowedT2_284_3_, task0_.taskInitiator_id as taskIni22_284_3_,
task0_.priority as priority284_3_, task0_.activationTime as
activati4_284_3_, task0_.actualOwner_id as actualO23_284_3_,
task0_.createdBy_id as createdBy24_284_3_, task0_.createdOn as
createdOn284_3_, task0_.documentAccessType as document6_284_3_,
task0_.documentContentId as document7_284_3_, task0_.documentType as
document8_284_3_, task0_.expirationTime as expirati9_284_3_,
task0_.faultAccessType as faultAc10_284_3_, task0_.faultContentId as
faultCo11_284_3_, task0_.faultName as faultName284_3_, task0_.faultType as
faultType284_3_, task0_.outputAccessType as outputA14_284_3_,
task0_.outputContentId as outputC15_284_3_, task0_.outputType as
outputType284_3_, task0_.parentId as parentId284_3_, task0_.previousStatus
as previou18_284_3_, task0_.skipable as skipable284_3_, task0_.status as
status284_3_, task0_.workItemId as workItemId284_3_, user1_.id as id279_0_,
user2_.id as id279_1_, user3_.id as id279_2_ from Task task0_ left outer
join OrganizationalEntity user1_ on task0_.taskInitiator_id=user1_.id left
outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id
left outer join OrganizationalEntity user3_ on task0_.createdBy_id=user3_.id
where task0_.id=?
INFO 10-09 13:21:46,436 - SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
INFO 10-09 13:21:46,437 - SENT: HeapBuffer[pos=0 lim=192 cap=256: 00 00 00
BC AC ED 00 05 73 72 01 00 1F 6F 72 67...]
INFO 10-09 13:21:46,437 - SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
[2010:09:253 13:09:437:debug] Message receieved on client :
QueryTaskSummaryResponse
[2010:09:253 13:09:437:debug] Arguments : [[]]
[2010:09:253 13:09:444:exception] No Task with ID 2 was found!
javax.persistence.EntityNotFoundException: No Task with ID 2 was found!
at
org.drools.task.service.TaskServiceSession.getEntity(TaskServiceSession.java:669)
at
org.drools.task.service.TaskServiceSession.getTask(TaskServiceSession.java:428)
at
org.drools.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:95)
at
org.drools.task.service.mina.MinaTaskServerHandler.messageReceived(MinaTaskServerHandler.java:41)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at
org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at
org.apache.mina.filter.logging.LoggingFilter.messageReceived(LoggingFilter.java:176)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at
org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
javax.persistence.EntityNotFoundException: No Task with ID 2 was found!
at
org.drools.task.service.TaskServiceSession.getEntity(TaskServiceSession.java:669)
at
org.drools.task.service.TaskServiceSession.getTask(TaskServiceSession.java:428)
at
org.drools.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:95)
at
org.drools.task.service.mina.MinaTaskServerHandler.messageReceived(MinaTaskServerHandler.java:41)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at
org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at
org.apache.mina.filter.logging.LoggingFilter.messageReceived(LoggingFilter.java:176)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at
org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
15 years, 6 months
Memory management manual or automatic?
by marton.bokor
Hi,
If I have many processes (one starts every minute or so) and I pass
parameters as a map in startProcess and then I am inserting facts into the
working memory. These are local variables (both parameters and facts) in my
code which will eventually come out of scope when leaving their block and
will be garbage collected. I'm using one session for all process instances.
So my question is: when this happens, will the engine recognize this and
free the memory inside the flow or I need to perform manual cleanup like
retracting the fact etc. AFAIK a fact is just a pointer, but will it be
removed from the map by the engine? If so when?
Thanks,
Marton
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Memory-management-man...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months