Adding an optional condition without using eval()
by djb
Hi,
My rule template project is finally working, more-or-less.
I've got 5 lines of conditions, the last 2 of which are evals. One of them
compares dates, and has to be an eval(). The other though, I think I should
be able to convert to non-eval DRL, but I am not sure how, because it is an
optional condition.
So, I've got
$current:Claim(historic==false, ...)
$historic:Claim(historic==true, ...)
eval($current.hasSameDoctor($historic,"@{CHECK_DOCTOR}"));
so, the line disappears if @{CHECK_DOCTOR} is blank, which is what I want.
I want something like, eval($current.doc == $historic.doc)
but i only want to check this if @{CHECK_DOCTOR} is "Y".
Is there any way to do this check without an eval?
Regards,
Daniel
--
View this message in context: http://n3.nabble.com/Adding-an-optional-condition-without-using-eval-tp42...
Sent from the Drools - User mailing list archive at Nabble.com.
16 years
java.lang.NoSuchFieldError during D5 upgrade
by Agrawal, Swapnil
Hi
I am upgrading our age old D3 rules system to D5.
Got all the jars, made the code changes and resolved errors as I faced them.
I am stuck on one which looks like an antlr error but don't know how it can be solved.
Error I get is:
Exception in thread "pool-2-thread-1" java.lang.NoSuchFieldError: m_memory
at com.ssmb.muni.ordermanagement.engine.multiengine.implementation.DroolsEngineWrapper.init(DroolsEngineWrapper.java:63)
at com.ssmb.muni.ordermanagement.engine.multiengine.DroolsEngineWrapperProxy$1.run(DroolsEngineWrapperProxy.java:148)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
I am using antlr-runtime-3.1.1.jar (one that comes with D5 binary package).
The earlier version was using antlr-3.0ea8.jar.
Is the antlr I am using correct or I need upgrade from runtime to the complete package or to a different version?
Thanks
Swapnil Agrawal
cell: 201 616 1189
desk: 212 816 7024
16 years
Health care meeting
by J Michael Dean
Any further information about the health care meeting mentioned in the blog for last week of March?
J Michael Dean, MD, MBA
HA and Edna Benning Presidential Professor of Pediatrics
Professor of Biomedical Informatics (adjunct)
Chief, Division of Pediatric Critical Care Medicine
Vice Chairman, Department of Pediatrics
University of Utah School of Medicine
Salt Lake City, U
16 years
Decision table and DSL
by philippe rouxel
Hi,
My project is multi-national: the business model is in english, but
some rules depend on the user's country (fr, de).
This rules have to be edited in the locale language.
For editing a rule, the guided rule editor and a DSL are fine.
But for a decision table, I did not find a way to use a DSL.
So, what is the best strategy:
+ use a template for each DT and loose the benefits of sharing the translation.
+ use an expander for each DT that parse a DSL and translate the terms.
Or may be an other solution?
Thanks,
Philippe
16 years
"from" keyword does not actually check types?
by Jevon Wright
Hi,
I am using Drools 4.0.7, and I had a DRL rule similar to the following:
rule "..."
when
other : Foo( )
x : Bar( ) from other.property
then
...
end
An unexpected bug occured. In some situations, other.property would _not_ be
of type Bar, yet Drools would still think that it was. As a result I was
getting some unusual exceptions being thrown: "org.mvel.CompileException:
unable to resolve property: ..."
If I changed the rule to:
x : Bar( ) from other.property
eval ( x instanceof Bar )
It would instead throw a ClassCastException (i.e. "Baz cannot be cast into
Bar").
If, instead, I changed the rule to:
x : Bar( other.property == x )
It would start working correctly, and 'x' would only be of type Bar.
Is this known behaviour? Is it expected? If so, I would appreciate it if the
4.0.7 documentation was updated to reflect that "from" actually ignores the
return type of properties. It took me a couple of hours to detect and fix
this bug.
I would try these rules in Drools 5.x, but I'm still waiting for the
blocking JBRULES-2218 to be resolved.
Cheers
Jevon
16 years
Drools Flow / Declarative process definition
by Jaroslav Pullmann
Dear Drools team,
I like much the approach of Drools Flow and would appreciate to learn more.
The documentation states the extended rule engine having knowledge of the process model
and instance state derives the next process execution step. I am wondering, whether the
overall flow is reactive, even the procedural constructs like sequence, branching/joining
are implemented through firing rule actions ? For example, does Drools Flow converts the
sequence of steps A -> B into sth. like "when A.passed then B.start()" ?
When the prevoius holds, does Drools Flow allows to create (desgin) and execute declarative processes
omiting any explicit sequencing ? The steps/tasks were ordered partially by data- or event-based
dependency conditions or even activated independently of each other.
Drools Flow/Expert provide a thight integration with Java (e.g. representing facts as Java classes).
Are there future plans for supporting a higher-level processing with XML/XPath/XQuery like in YAWL ?
Many thanks
Jaro
--
Jaroslav Pullmann
Web Compliance Center - Fraunhofer FIT
Schloss Birlinghoven, D-53757 Sankt Augustin, Germany
Phone: +49-2241-142623 Fax: +49-2241-142065
16 years
Process with subprocesses don't continue after finish work items in the subprocesses
by Dirk
Hey Drools-Users,
I've got a big and urgent problem with my drools process. I have a complex
process with many decisions and subprocesses. These subprocesses could even
contains more subprocesses so that i have a four-level flow.
I testet each subprocess isolated in a mock environment and now i get my
problem when they are combined in a big "super-process". I create the
process with the JPAKnowledgeService (and VariablePersistenceStrategy) and
everything works as expected. The process execute some actions, a
validation-subprocess and another subprocess with a human task (with a
custom handler). The process stops and persist all the variables (except
Integers; Must be a bug?). Perfect. Now I load the session with the
JPAKnowledgeService and complete the workitem with the
ksession.getWorkItemManager().completeWorkItem method. The subprocess now
execute to the end and then the engine stopps without an error. But there
are more steps in the superprocess todo. All subprocesse are "independent =
true" with "wait for completion = true" and don't have timers.
Has anybody an idea? Is this a known problem? I'm using the last
successfully build form the 21.02.2010. Do you need the process? (Then i
have to remove some internal information and could post it...)
Many thanks in advance
Dirk
--
View this message in context: http://n3.nabble.com/Process-with-subprocesses-don-t-continue-after-finis...
Sent from the Drools - User mailing list archive at Nabble.com.
16 years
Using DeadLines in Human Task
by ramram
Hi All,
I am trying to use the DeadLine option in the human task but I am having
the following exception once trying to run the task: I am trying to run the
task from the eclipse. Any Ideas????
[2010:02:55 13:02:118:exception] Uncaught exception on client
org.apache.mina.filter.codec.ProtocolDecoderException:
org.apache.mina.core.buffer.BufferDataException:
java.io.InvalidClassException: failed to read class descriptor (Hexdump:
...........)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:231)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:431)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$5(DefaultIoFilterChain.java:426)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:787)
at
org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:431)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:423)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:635)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:595)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:584)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$7(AbstractPollingIoProcessor.java:581)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:966)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:61)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.mina.core.buffer.BufferDataException:
java.io.InvalidClassException: failed to read class descriptor
at
org.apache.mina.core.buffer.AbstractIoBuffer.getObject(AbstractIoBuffer.java:1984)
at
org.apache.mina.filter.codec.serialization.ObjectSerializationDecoder.doDecode(ObjectSerializationDecoder.java:92)
at
org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:178)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:221)
... 15 more
Caused by: java.io.InvalidClassException: failed to read class descriptor
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.util.ArrayList.readObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at
org.apache.mina.core.buffer.AbstractIoBuffer.getObject(AbstractIoBuffer.java:1982)
... 18 more
Caused by: java.lang.ClassNotFoundException:
org.hibernate.PersistentObjectException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.apache.mina.core.buffer.AbstractIoBuffer$3.readClassDescriptor(AbstractIoBuffer.java:1962)
... 42 more
--
View this message in context: http://n3.nabble.com/Using-DeadLines-in-Human-Task-tp412870p412870.html
Sent from the Drools - User mailing list archive at Nabble.com.
16 years