Rules not firing when facts asserted in a rule RHS in 5.0
by Chris Selwyn
I have been using the open source Drools 5.1 where I have been inserting
facts in the RHS of a rule and that has been causing subsequent rules to
fire just fine.
However, I am working at a customer that requires my to use a supported
product, so I have moved my rules over to JBoss Rules 5.0.2 and I find
that this does not work any more.
I have a declarative fact type as follows
declare QuestionValidation
question: String
state: String
mandatory: Boolean
type: String
end
I have an "init" rule with high salience that inserts a number of
QuestionValidations into the session.
In order to test what is going on, I created a rule:-
rule 'Test'
dialect 'mvel'
when
$qv: QuestionValidation()
then
System.out.println( "QuestionValidation found " + $qv.getQuestion()
+ "/" + $qv.getState() );
end
This rule never fires if I insert a QuestionValidation in the init rule!
I can see the facts being inserted in the log as follows
[#|2010-12-01T09:19:16.723+0000|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=70;_ThreadName=p:
thread-pool-1; w: 7;|
OBJECT ASSERTED value:QuestionValidation( mandatory=true, state=Closed,
question=B2B_METER_SERIAL_NUMBER, type=string ) factId: 39|#]
But I don't see any associated "ACTIVATION CREATED" for this object.
However, if I insert a QuestionValidation fact created in Java by using
kbase.getFactType("SWWB2BOutgoing", "QuestionValidation") then the Test
rule gets fired just fine.
Is there something I am missing? Do I need to to turn on rule chaining
or something like that? (Surely chaining is on by default).
Chris
15 years, 6 months
Reference a declared FactType from another rule file?
by Gerret Hansper
Hi all,
does anybody know whether it's possible to reference a FactType declared
in one rule file from another one? I'm developing rules with Eclipse
(using Drools 5.0.1) and the rules are spread over a couple of .drl
files. It would be nice to be able to declare a FactType in one file,
have a rule insert instances of it into working memory and have another
rule in another file (but the same package) use it in its LHS.
I've tried various import statements but the compiler doesn't seem to be
able to resolve the reference.
Thanks,
Gerret
15 years, 6 months
Opportunity
by Jonathan Becker
Hey everyone,
Sorry to post on this forum, but I've got to say, I'm have a bear of
time finding people skilled with either Drools or jRules. I have
multiple FTE/permanent opportunities for strong engineers in the greater
Seattle area. My client is profitable, privately-held, has zero debt
and is growing at a rate of 50%. If you're at all curious, please shoot
me an email for details. If you know someone who's interested, I pay a
substantial finder's fee if my client hires them. Thanks for your time
and sorry to interrupt!
Regards,
Jonathan Becker
Senior Account Manager
o: (425) 454-0282 ext 160 | f: (425) 454-5784
www.triadgroup.com | jonathanb(a)triadgroup.com
15 years, 6 months
Hi...
by Bennet Joseph
Hi All,
Please any one send me one very small application which persist the details.
org.drools.persistence.session.SessionInfo
org.drools.persistence.processinstance.ProcessInstanceInfo
org.drools.persistence.processinstance.ProcessInstanceEventInfo
org.drools.persistence.processinstance.WorkItemInfo
org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo
org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable
thanks,
Jose.
15 years, 6 months