Argument truncation in decision table
by Robert Morse
Hello,
I have a Seam (2.2.0.GA) application running under JBoss 5.1.0.GA.
This release of Seam uses the Drools 5.0.1.GA build. I'm implementing
a Decision Table for the first time and importing it into Guvnor (also
from the same distribution). One of the consequences of several
rules is to call a method that had eight arguments: (String, String,
Boolean, Boolean, Integer, String, String, String). When I attempted
to compile the rule set, the method was truncated after the fifth
(Integer) argument which obviously caused some compile issues. My
work around was to break this single method in to two methods, and it
works just fine.
The original method worked just fine when used in a DRL. Don't know
if there's a limit to function arguments within Decision Tables or if
this might be a bug.
-robert.
The human mind is an iterative processor, it never does anything right
the first time. What it does well is to make improvements on every
iteration (deMarco)
15 years, 1 month
Process variables in split/action nodes
by Renato Herebia
Hi!
How can I access process variables inside split nodes, in fact, in split
contraints?
I accessed a process variable named "count" in an action node like that:
Integer c = (Integer) kcontext.getVariable("count");
kcontext.setVariable("count", ++c);
But, in a split constraint doesn't work. So, my doubts are:
- How is the way in split constraints?
- Is there a simpler way to access process variables in action node?
Thanks!
--
Renato Herebia
15 years, 1 month
Simultaneous queries against working memory
by Scott Burrows
Drools 4.0.7
Are running drools queries against working memory thread safe? I know that
inserts and retracts need to be synchronized but what about queries? I
would am considering having multiple threads querying working memory for
different facts at the same time.
For example:
final QueryResults results = workingMemory.getQueryResults("GetMCCObjects");
for (Iterator it = results.iterator(); it.hasNext(); ) {
result = (QueryResult) it.next();
mccDelObj = (MerchantCategoryGroup) result.get("mccObjects");
fhMCCGroup = workingMemory.getFactHandle(mccDelObj);
WMSyncdInsertRetract(fhMCCGroup, RETRACT);
}
Scott
15 years, 1 month
Drools Flow: waiting for process to complete without polling
by Alexandros Karypidis
Hello,
I'm not very experienced in the Drools Flow API so I'm looking into the
best way to code a simple thing: wait for all processes in a session to
complete without polling.
The only way I could thing of from the javadoc reference I read, is to
synchronize and do a wait()/notify() using a ProcessEventListener. It
seems a lot of work for a use-case that is too basic. I set up a
listener like this:
pel = new ProcessEventListener() {
// ...
public void afterProcessCompleted(ProcessCompletedEvent pce) {
synchronized (this) {
notifyAll();
}
}
}
ksession.addEventListener(pel);
...then wait for processes (one in this simplified case) to complete
like this:
synchronized (pel) {
new Thread(new Runnable() {
public void run() {
ksession.fireUntilHalt();
}
}).start();
ksession.startProcess("some.process");
pel.wait(); // the notifyAll() resumes this
}
Is there a better way to do this?
15 years, 1 month
Decision Tables agenda group
by Swindells, Thomas
I've been trying to get agenda groups working and after a bit of poking
around have realised that agenda group support is broken.
Looking on jira somebody has already raised the bug and supplied a
simple patch (https://jira.jboss.org/jira/browse/JBRULES-2208) when is
this patch likely to be applied to trunk or do I need to maintain my own
branch of the decision tables?
Thanks,
Thomas
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
15 years, 1 month
Class loader security exception
by kamal konduru
Hi Everyone,
I have a problem deploying drools5 project. In our deployment process due
to security reasons JVMS are not allowed to create clasloader. However
Drools is trying to create a CompositeClassLoader which interns calls a
System Class Loader's constructor, that is not allowed by JVM.
The rules are not complicated, however we have around 200 rules in around 4
to 5 drls and would like to deploy them in JVM.
Please suggest if there is any way to bypass this security issue.
thanks
kamal Konduru
--
View this message in context: http://www.nabble.com/Class-loader-security-exception-tp25705700p25705700...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 1 month
(no subject)
by Steve Ronderos
Hello Drools Users,
I've been looking into why Drools 5 is logging debug and info messages to
System.out in my app and trying to figure out how to make it stop. It
looks like the SystemEventListener that the SystemEventListenerFactory
returns is a DelegatingSystemEventListener that delegates to a
PrintStreamSystemEventListener. This, by default, uses System.out as the
print stream target. I looked into the Factory and it looks like I can
provide a different SystemEventListener or SystemEventListenerProvider,
but it also mentions that it did not find anything in the properties, so
it fails over to the default SystemEventListenerProvider. Is there a way
to configure a custom SystemEventListener or SystemEventListenerProvider
so that you don't have to call
SystemEventListenerFactory.setSystemEventListenerProvider() at startup?
Thanks,
Steve Ronderos
15 years, 1 month
Multiple worksheet decision tables
by Swindells, Thomas
Is it possible to get Drools to load all the rules table within an excel spreadsheet if they are spread across multiple worksheets?
>From the documentation I have read it appears drools will only load the rules from the first/a specified worksheet.
The only way I have found to do it is to load the worksheet multiple times and explicitly state each of the worksheet names in turn. Is this the only way?
If so is there any easy way to get the names of all the worksheets in the file? The application won't know the worksheet names ahead of time.
Many thanks,
Thomas
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
15 years, 1 month