Guvnor
by Thurow, Kimberly
Hi,
I don't know if this is the right place for questions about Guvnor but I haven't been able to find any other place. I'd like to know if anyone is using it. I'm having a hard time using it. There doesn't seem to be a concept of deleting a package or reimporting a model if the previous one had errors. Since the "menu items" appear rather than being present all the time, I can't get the import to reappear anywhere. I'm also having trouble getting an operator selection to appear when trying to enter a new rule in the Mortgages example. I've read the documentation but didn't see anything about this or about errors. Is there a forum specifically for Guvnor?
Thanks in advance.
Kimberly Thurow
-----Message Disclaimer-----
This e-mail message is intended only for the use of the individual or
entity to which it is addressed, and may contain information that is
privileged, confidential and exempt from disclosure under applicable law.
If you are not the intended recipient, any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by
reply email to Connect(a)principal.com and delete or destroy all copies of
the original message and attachments thereto. Email sent to or from the
Principal Financial Group or any of its member companies may be retained
as required by law or regulation.
Nothing in this message is intended to constitute an Electronic signature
for purposes of the Uniform Electronic Transactions Act (UETA) or the
Electronic Signatures in Global and National Commerce Act ("E-Sign")
unless a specific statement to the contrary is included in this message.
While this communication may be used to promote or market a transaction
or an idea that is discussed in the publication, it is intended to provide
general information about the subject matter covered and is provided with
the understanding that The Principal is not rendering legal, accounting,
or tax advice. It is not a marketed opinion and may not be used to avoid
penalties under the Internal Revenue Code. You should consult with
appropriate counsel or other advisors on all matters pertaining to legal,
tax, or accounting obligations and requirements.
16 years, 10 months
Help on using Drools with embedded objects
by Divya Rajendranath
Hi,
I am planning to use Drools - JBoss Rules Engine. My requirement is to
disburse mails from my application to different groups based on various
criteria. I want to use Drools here.
My object structure is as follows:
class A{
String B = "";
B b;
C c;
}
Hence Obj A has embedded objects within it, and obj B and C further has
embedded objects.
class B {
String X;
Z z;
}
class Z{
String t;
String s;
}
The decision on sending the mails based on the fields in embedded objects of
A. I pass instance of A to Drools
Format of drl file:
package...;
import ..;
rule "Test"
when $a:A(B(Z(s == "testvalue")))
then
$a.setSomething();
update($a);
end
I wanted to know if this (accessing fields in embedded/child object) is
feasible with Drools.
I get an error saying "UNable to compile myfile.drl when i try to fo this.
Could some one look into this issue and let me know the reason for this ?
Thanks
-D
16 years, 10 months
AgendaFilter for StatelessKnowledgeSession
by Michal Bali
Hi,
1) How can an org.drools.runtime.rule.AgendaFilter be set for a
StatelessKnowledgeSession? Is this not supported?
2)Just a question. StatelessSessionResult had a iterateObjects(ObjectFilter
objectfilter) method. This method is not
in StatelessKnowledgeSessionResults. Is this no longer supported ?
Thanking you in advance.
Best Regards,
Michal
16 years, 10 months
Split, mvel
by Femke De Backere
Hi,
I encountered the following error, trying to insert a Split node in my
ruleflow.
[8,0]: [ERR 103] Line 8:0 no viable alternative at input 'testType' in
rule "RuleFlow-Split-masterproef.ruleflows.sedation-4-9"
[16,5]: [ERR 103] Line 16:5 no viable alternative at input 'testType'
in rule "RuleFlow-Split-masterproef.ruleflows.sedation-4-5"
java.lang.IllegalArgumentException: Could not parse knowledge.
at
masterproef
.rulerunner.RuleFlowRunner.createKnowledgeBase(RuleFlowRunner.java:120)
at
masterproef
.rulerunner.RuleFlowRunner.createWorkingMemory(RuleFlowRunner.java:94)
at masterproef.rulerunner.RuleFlowRunner.<init>(RuleFlowRunner.java:81)
at masterproef.rulerunner.RuleFlowRunner.main(RuleFlowRunner.java:72)
The split node contains the folowing code:
Patient( testType : type )
not (testType == 'Korte sedatie')
My Patient-class contains a methode getType().
Does anyone know how I can solve the error?
Thx!
Femke
16 years, 10 months
drools-core.jar
by Salem, Hesham (EXP)
Where do I find drools-core.jar
Hesham Salem
Lockheed Martin UK Limited
Simulation Training and Support
Tel: +44(0) 1252 553408
Fax: +44(0) 1252 553341
2nd Floor Chester House, Farnborough Aerospace Centre
Farnborough, Hants, GU14 6TQ, UK
Email: hesham.salem(a)lmco.com
16 years, 10 months
Agenda events in a Stateless session
by David Boaz
Hi all,
Im developing using drools version 5.0.0.M5. My application uses a stateless
session. I tried to assign an AgendaEventListener to the session, but failed
with a NPE.
This is my code structure:
KnowledgeBase kb =...;
StatelessKnowledgeSession session = kb.newStatelessKnowledgeSession();
session.getAgendaEventListeners().add(new DebugAgendaEventListener());
==>NPE!
java.lang.NullPointerException
at
org.drools.impl.StatelessKnowledgeSessionImpl.getAgendaEventListeners(StatelessKnowledgeSessionImpl.java:123)
Am I doing something wrong, or is it an error in drools?
Thanks, David
--
View this message in context: http://www.nabble.com/Agenda-events-in-a-Stateless-session-tp22305709p223...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 10 months
Creating objects in WHEN clause
by David Boaz
In my application, we often compare the fact's field values against a known
object. For example:
WHEN person(height> new Quantity(2, "m")) // the height is greater than 2
meters.
will DROOLS create a "singleton" Quantity object, or will it create one
object for each fact evaluation?
We consider using anoter approach, using GLOBALS. Then, the Quantity object
will be created applicatively, and passed by the API to the engine.
something like:
GLOBAL Quantity 2meters
WHEN person(height > 2meters)
But this approach is combersom, because the rule author has to define part
of the information in the calling application, and part in the rule.
Do you have a good practice how to handle these situations?
Thanks, David
--
View this message in context: http://www.nabble.com/Creating-objects-in-WHEN-clause-tp22207616p22207616...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 10 months
Smooks and Drools Pipeline
by Dave Macpherson
Hey guys (Drools newbie here)
I'm *attempting* to use the Drools/Smooks pipeline functionality to insert
facts into my knowledgebase and I'm having a little trouble figuring out
exactly how to do this. I've read the API docs for the 5.0.0.M5 and looked
at the test cases but I guess I'm still not quite getting it, so I'm hoping
someone here can point me in the right direction.
I've got an XML file defined basically like this:
<submission>
<facility>
<faccode>xxx</faccode>
</facility>
<lineitem>
<acctcode>xxxx</acctcode>
<amount>999</amount>
<lineitem>
<lineitem>
<acctcode>xxxx</acctcode>
<amount>999</amount>
<lineitem>
<submission>
Within the XML file, there is 1 and only 1 "facility" node and multiple
"lineitem" nodes. I'd like to use the DroolsSmooks pipleline functionality
to use Smooks to insert 1 "facility" fact and multiple "lineitem" facts into
my knowledgbase.
The code I've written to do this is similar to the following (taken from
sample test code I've seen in the Drools source):
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
Action executeResultHandler = PipelineFactory.newExecuteResultHandler();
KnowledgeRuntimeCommand insertStage =
PipelineFactory.newStatefulKnowledgeSessionInsert();
insertStage.setReceiver(executeResultHandler);
Smooks smooks = new Smooks("smooks-config.xml");
Transformer transformer =
PipelineFactory.newSmooksFromSourceTransformer(smooks, "root");
transformer.setReceiver(insertStage);
Pipeline pipeline =
PipelineFactory.newStatefulKnowledgeSessionPipeline(ksession);
pipeline.setReceiver(transformer);
ResultHandlerImpl resultHandler = new ResultHandlerImpl();
pipeline.insert(ResourceFactory.newClassPathResource("submission.xml"),
resultHandler );
While stepping through the above code, the last line returns an NPE. I've
tried playing with the "Transformer transformer - PipeLineFactory." line,
substituting "root" for something else and it goes into an infinite loop.
What is the purpose of the "root" value being set in this line?
Can anyone tell me if I'm even on the right track here, or am I
misunderstanding what the Smooks data loader can do for me?
Regards,
Dave
16 years, 10 months
java.lang.NoClassDefFoundError: org/drools/spi/Consequence
by Ojwang Wilson O
All,
I am getting the error below while passing DroolsAnt build pkg as a
property to RuleAgent. I am using Java 6 update 12.
===================
2009-03-02 16:48:59,363 Stdout ERROR callout.err - RuleAgent(default)
INFO (Mon Mar 02 16:48:59 CST 2009): Configuring package provider :
FileScanner scanning: /home/nxuser/proxy/resource/iaoc/rules/Rules.pkg
java.lang.NoClassDefFoundError: org/drools/spi/Consequence
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at
org.drools.rule.PackageCompilationData$PackageClassLoader.fastFindClass(PackageCompilationData.java:333)
at
org.drools.rule.PackageCompilationData$PackageClassLoader.loadClass(PackageCompilationData.java:353)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at
org.drools.common.DroolsObjectInputStream.resolveClass(DroolsObjectInputStream.java:79)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
==================
Regards
Wilson
16 years, 10 months