Drools Flow, constraint parametrization
by Ricardo Gil Alcañiz
Hi,
I'm not a new drools user but I started to test rule flows (5.0M5) recently
and I'm stucked, so any clue will be welcomed :). I'm testing how to share a
StatefulKnowledgeSession between N rule flow instances. I'm trying to
parametrize each instance with process variables at start time but I don't
know how to use them from rule constraints (in event waits, splits, etc.).
I've read the documentation and I've found this text related to constraints
"Both rule and code constraints have access to globals that are defined for
the process and can reuse imports at the process level." I tried it
assigning (from an action) a variable value to a global variable but it's
not working for me. ¿I'm missing something?
Thanks in advance!
Ricardo.
17 years, 3 months
Timer isn't firing
by Cristiano Gavião
Hi,
I've created a simple process flow with a start node followed by a
timer (with delay = 1 and period = 0), an workitem node, and an end
node.
Its simple but isn't working properly. The problem is that process
isn't getting out from the timer node. Nothing happens...
Its something more needed to get timer working?
This is the output generated:
BEFORE RULEFLOW STARTED process:ProcessoX[id=ProcessoX]
BEFORE RULEFLOW NODE TRIGGERED node:Start[id=20]
process:ProcessoX[id=ProcessoX]
null process:ProcessoX[id=ProcessoX]
BEFORE RULEFLOW NODE TRIGGERED node:Timer[id=19]
process:ProcessoX[id=ProcessoX]
AFTER RULEFLOW NODE TRIGGERED node:Timer[id=19]
process:ProcessoX[id=ProcessoX]
null process:ProcessoX[id=ProcessoX]
AFTER RULEFLOW NODE TRIGGERED node:Start[id=20]
process:ProcessoX[id=ProcessoX]
AFTER RULEFLOW STARTED process:ProcessoX[id=ProcessoX]
thanks in advance
_________________________
Cristiano V. Gavião
17 years, 3 months
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.
17 years, 3 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
17 years, 3 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
17 years, 3 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
17 years, 3 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
17 years, 3 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.
17 years, 3 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.
17 years, 3 months