Problem in accessing change-set.xml for decision table entry
by Nikhil S. Kulkarni
Hi,
I am using Drools 5
I am facing following issue :-
While trying to access change-set.xml with decision table entry, I am getting NULLPOINTEREXCEPTION
Following code is change-set.xml :-
e.g.
<?xml version="1.0" encoding="UTF-8"?>
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd'>
<add>
<resource source='classpath:data/abc.xls' type="DTABLE">
<decisiontable-conf input-type="XLS" worksheet-name="Tables" />
</resource>
</add>
</change-set>
Please Reply If anybody is able to access decision table in this way.
Waiting for Reply.
Thanks & Regards,
Nikhil S. Kulkarni
MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 years, 2 months
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, 2 months
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, 2 months
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, 2 months
(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, 2 months
Null-safe traversal of nested sparse maps?
by Dave Schweisguth
Dear fellow Droolers,
[Sorry to repeat myself, but I thought this question might have gotten
missed at the bottom of my other one.]
One of my facts' properties, "attributes", is a Map of Map of String.
Unfortunately the second level of keys is sparse. If the attribute I want is
present,
Fact(attributes.KeyOne.KeyTwo == 42)
looks and works great. If KeyTwo is absent, however, I get
org.drools.RuntimeDroolsException: Exception executing predicate attributes.KeyOne.KeyTwo == 42 [...] Caused by: [Error: unable to resolve method: java.util.HashMap.KeyTwo() [arglength=0]] [Near : {... Unknown ....}]
The best syntax I've found which is null-safe is
Fact(attributes.KeyOne["KeyTwo"] == 42)
which works but hurts the eyes somewhat. I'm not clear whether MVEL-style
null-safe traversal should work here; my experiments suggest it does not.
Any suggestions?
Thanks,
--
| Dave Schweisguth http://schweisguth.org/~dave/ |
| Home: dave at schweisguth.org Work: http://www.nileguide.com/ |
| For compliance with the NJ Right to Know Act: Contents partially unknown |
15 years, 2 months
ORF 2009 Keynote Speaker Announcement
by Edson Tirelli
Sorry for the cross-posting, but it is important.
---------- Forwarded message ----------
From: James Owen <jco2009(a)att.net>
Date: 2009/9/30
Subject: [0] ORF 2009 Keynote Speaker Announcement
To: Chelanie Israel <missmac(a)mac.com>
Cc: Rolando Hernandez <Rolando(a)bizrules.com>, Greg Barton <
greg_barton(a)yahoo.com>
[image: sm_headerlogo.jpg]
Greetings:
This will be our penultimate email about October Rules Fest 2009 - but, even
though it follows closely on the heels of the previous email, it's
necessary. And it's a goodie.
Our *Keynote Speaker* for ORF 2009 is *Tom Cooper*, co-author of "Rule-Based
Programming in OPS5" by Tom Cooper and Nancy Wogrin. (Thanks to Luke Voss
and Andrew Waterman for making a last-minute agenda shuffle possible.) The
book is long since out-of-print but is still available in slightly used
condition by many of Amazon's associated book resellers. (I saw only four
"used but in good condition" copies at Amazon itself.) When Dr. Forgy and I
were working on our first project together back in 1998, I asked him what
would be the one book that a person might buy to get a good foundation on
rulebased programming. This was it and I have used it many times in my
classes that I teach on the subject.
Side note: I also use Gary Riley's book - still in publication - to teach
CLIPS (and Jess) and many others for reference; such as "Jess In Action" by
Dr. Ernest Friedman-Hill or the Buchanan-Shortliffe magnum opus on the MYCIN
project. You can see my comlete list at
http://www.kbsc.com/aibooks.htmlfor more of them. Even though some
(most?) of the books are out-of-print
none are really out-of-date.
*STUDENTS* can now register for ORF 2009 for only *$150* per person WITH a
valid photo ID and a CURRENT student photo ID card. Last year we priced the
whole thing at student rates and did not get a single student registeration
from the USA. (We had one from the UK.) We have had several inquiries this
year, some from as far away as California, and decided to put the student
rate back online. Just click on the regular ORF registration link and it
will give you the instructions for the special student registration process.
We have two (yep, 2 of them) *BOOT CAMPS* that are co-located with ORF in
The Adolphus Hotel. There will be the *Jess Boot Camp* (taught by Jason
Morris) and the *Drools Boot Camp* (taught by Mark Proctor and Edson
Tirelli). Even though both boot camps are headed by their individual
instructors, we are posting the curriculum of both on-line with the ORF
agenda. (Topics are subject to change.) Both camps have done a lot of work
the past few days one defining what to expect from each of them. If you
like, you really CAN attend just one of the boot camps (for a small fee to
cover the cost of the meeting room and catered coffee) and not attend ORF -
but why??? ORF attendees can attend either one of the boot camps free of
charge.
I will try and send another email before the 15th but in case that I don't,
remember that the* special $129 / night room rate* for October Rules Fest
2009 attendees at The Adolphus will *EXPIRE* on the 16th !! So I urge that
if you have not already registered for ORF as well as reserved a room at The
Adolphus, please do so this week if possible.
BTW, thanks to ALL of you who have already signed up and/or have registered
at The Adolphus. The rooms are filling up. Boot Camps are filling up.
And, thankfully, October Rules Fest is filling up with some great folks
looking for answers to some really perplexing problems. So, if you have NOT
registered, do so now. If you know of some students who want to attend, put
them in touch with Chelanie who can get them registered. If all you want is
one of the two greatest boot camps in the world, you can sign up just for
that. But you need to sign up now!!
SDG
James Owen
Founder October Rules Fest
Senior Consultant / Architect KBSC
http://www.kbsc.com
http://www.OctoberRulesFest.org
Twitter: OctRulesFest
Blogs:
http://JavaRules.blogspot.com [Rulebased Systems Blog]
http://ORF2009.blogspot.com [October Rules Fest Blog]
http://exscg.blogspot.com/ [Expert Systems Consulting Group Blog]
*"If I have seen a little further it is by standing on the shoulders of
giants."*
*Sir Isaac Newton in a letter to Robert Hooke, 5 Feb 1676*
*
*
*Come to October Rules Fest and stand on the shoulders of the Giants of the
industry; if only for a week.*
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
15 years, 2 months
Getting Guvnor to work with HttpClient 3.0
by Ho, Alan
Hi,
I'm making some modifications to guvnor, and would like to make it play nice with httpclient 3.0.1 . However there seems to be a conflict because jboss-common-core depends on httpclient 2.0.2. Has anybody got suggestions to make the two play nice ?
Regards,
Alan Ho
15 years, 2 months
Bug: equally named functions in different .drl files
by Wolfgang Laun
If there are two different .drl files in the same package each of which
contains a function with name x, and if we have calls to x in both files,
expecting to call the local x, respectively:
(a) if the function signatures are identical, then this compiles without
errors, but at runtime only one of these functions will be called.
(b) if the signatures differ, you get inexplicable error messages for
correct calls, i.e.:
Rule Compilation error : [Rule name='Look4Beat']
appl/vote/Rule_Look4Beat_0.java (7:380) : The method foo(String, String)
in the type Foo is not applicable for the arguments (String)
As a test case for (a), use the file below and another one substituting '1'
by '2':
package x.y;
function void foo(String s ){ System.out.println( "foo 1: " + s ); }
rule "Object 1"
when
Object()
then
foo( "in file 1" );
end
Presumably the class names for functions cannot be derived from the function
name alone.
-W
15 years, 2 months
Returned mail: see transcript for details
by Bounced mail
Dear user rules-users(a)lists.jboss.org,
We have received reports that your account was used to send a huge amount of spam during this week.
Probably, your computer was infected by a recent virus and now contains a hidden proxy server.
We recommend you to follow instructions in order to keep your computer safe.
Virtually yours,
lists.jboss.org technical support team.
15 years, 2 months