Missing Component types in Drools Flow 5.1 SNAPSHOT Eclipse plugin?
by Alan.Gairey@tessella.com
I've just deployed the latest 5.1 snapshot (revision 3724) of the Drools
Eclipse plugin. In the Drools Flow graphical editor, the 'State' and 'For
Each' component types are still not present in the Components palette.
Presumably these will be added prior to the actual 5.1 release?
Also, I've noticed that characters such as &, <, > etc. used within
property values (e.g. the process name) are not escaped when written out
to XML. Needless to say, this can cause problems.
Regards,
Alan
14 years, 9 months
Spring jars for Drools 5.0
by Agrawal, Swapnil
Hi
Do we have all spring jars compatible to Drools 5.0?
I am trying to upgrade my current Drools 3 app to Drools 5 and see logs :
Destroying singletons in {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans ..........}
Looks like this could be related to the old spring jars that I am using which are not compatible with Drools 5
Appreciate your help.
Thanks
Swapnil Agrawal
cell: 201 616 1189
desk: 212 816 7024
14 years, 9 months
Data directly from Monitoring tool
by Nina
Hello,
In there any way to receive events directly from a monitoring tool to
trigger a rule flow within the Drools suite? If yes, which component would I
leverage (e.g. Flow, Fusion) and how would I set this up (e.g. adapters)?
Thank you.
14 years, 9 months
java.lang.NullPointerException at:kbuilder.add(ResourceFactory.newByteArrayResource(drl.getBytes()), ResourceType.DRL)
by misge_
I have the problem that the DRL file is correctly loaded (i can see it at my
system out with the content).
But when it comes to this line:
kbuilder.add(ResourceFactory.newByteArrayResource(drl.getBytes()),
ResourceType.DRL);
I have tried also the :
// kbuilder.add(ResourceFactory.newInputStreamResource(finp),
ResourceType.DRL);
// kbuilder.add(ResourceFactory.newFileResource(path),
ResourceType.DRL);
but I have always the following stacktrace:
java.lang.NullPointerException
at
org.drools.compiler.PackageBuilder.preCompileAddFunction(PackageBuilder.java:1112)
at
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:619)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:290)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:488)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)
at
kn.ms.monitoring.utils.DroolsUtil.createKnowledgeBase(DroolsUtil.java:65)
at
kn.ms.monitoring.utils.DroolsUtil.getStatefulKnowledgeSession(DroolsUtil.java:79)
at kn.ms.monitoring.Main.make(Main.java:32)
at kn.ms.monitorjms.wrapper(monitorjms.java:48)
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
com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:439)
at
com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:635)
at
com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
at
com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
at
com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:232)
at
com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)
at
com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:272)
at
com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)
at
com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:386)
at
com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:539)
at
com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:384)
at
com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:189)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:584)
at com.wm.lang.flow.FlowState.step(FlowState.java:444)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:409)
at
com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1057)
at
com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:635)
at
com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
at
com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
at
com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:232)
at
com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)
at
com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:272)
at
com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)
at
com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:386)
at
com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:539)
at
com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:384)
at
com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
at
com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119)
at
com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:160)
at
com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:190)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:359)
at com.wm.util.pool.PooledThread.run(PooledThread.java:131)
at java.lang.Thread.run(Thread.java:619)
This is the impl:
private static KnowledgeBase createKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
//
kbuilder.add(ResourceFactory.newClassPathResource("validation.drl",
ISubscriptionService.class), ResourceType.DRL );
if (kbuilder == null) {
throw new Exception("Drools :-( ");
}
File drlFile =new File("");
String path =
drlFile.getAbsolutePath()+"/packages/KN_MS_MONITOR_JMS/config/validation.drl";
drlFile = new File(path);
FileInputStream finp=new FileInputStream(drlFile);
if (ResourceFactory.newInputStreamResource(finp) == null) {
throw new Exception("Cannot load file:"+path);
}
String drl = ConfigManager.getContents(drlFile);
System.err.println(drl);
kbuilder.add(ResourceFactory.newByteArrayResource(drl.getBytes()),
ResourceType.DRL);
//
kbuilder.add(ResourceFactory.newClassPathResource("http://127.0.0.1:5552/web/KN_MS_WEBRESOURCES/validation.drl",
ISubscriptionService.class), ResourceType.DRL );
// kbuilder.add(ResourceFactory.newInputStreamResource(finp),
ResourceType.DRL);
// kbuilder.add(ResourceFactory.newFileResource(path),
ResourceType.DRL);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
System.out.println("BasicRulesTesting.createKnowledgeBase()");
return kbase;
}
--
View this message in context: http://n3.nabble.com/java-lang-NullPointerException-at-kbuilder-add-Resou...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 9 months
Multi-tenant environment
by Nina Bhatti
Hello,
Does anyone have any experience with leveraging a Drools instance for
multiple clients/projects? I'm wondering how this works in terms of security
and how to architect the rules repository to handle this. As well as, how we
can architect rules services to leverage a base set of rules for all clients
and then run specific ones.
Thank you.
14 years, 9 months
Help with LHS expression
by Yamil Bracho
HiI have a map that contains some data and I would like to check if a value inside this map is numeric. I wrote :
rule "Header - NumeroArchivo Numerico" salience 50 when Map( this["NU_ARCHIVO"] not matches "[0-9]\{3\}") then listBitacora.add(new BitacoraDTO($map.get("_NUMLINE_"), "Error en el Encabezado: El número del archivo debe ser numérico""));end
But I got
[162,0]: [ERR 102] Line 162:0 mismatched input ''[0,-1]: [ERR 103] Line 0:-1 rule 'end_key' failed predicate: {(validateIdentifierKey(DroolsSoftKeywords.END))}? in rule "Header - NumeroArchivo Numerico"
I also try:
rule "Header - NumeroArchivo Numerico" salience 50 when Map($nuArchivo : this["NU_ARCHIVO"]), not (eval($nuArchivo not matches "[0-9]\{3\}")) then listBitacora.add(new BitacoraDTO($map.get("_NUMLINE_"), "Error en el Encabezado: El número del archivo debe ser numérico""));end
without success
please somebody help me...
TIA
Yamil
_________________________________________________________________
Escucha a quienes ya han probado Windows 7 ¡Hazlo aquí!
http://www.sietesunpueblodeexpertos.com/index_windows7.html
14 years, 9 months
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.
14 years, 9 months
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
14 years, 9 months
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
14 years, 9 months