We aren't seeing the code where the insertions happen, but I suppose that's identical to<br>repeats of<br> QuestionValidation qc = new QuestionValidation();<br> insert( qv );<br><br>I'm sure you've also ascertained that the inserted value:QuestionValidation<br>
is the very same type (including package) as the one used in rule "Test".<br><br>I would try and use a Java equivalent for the declared class QuestionValidation,<br>just to see whether this is at the root of the problem.<br>
<br>-W<br><br><br><div class="gmail_quote">On 1 December 2010 11:13, Chris Selwyn <span dir="ltr"><<a href="mailto:chris@selwyn-family.me.uk">chris@selwyn-family.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have been using the open source Drools 5.1 where I have been inserting<br>
facts in the RHS of a rule and that has been causing subsequent rules to<br>
fire just fine.<br>
<br>
However, I am working at a customer that requires my to use a supported<br>
product, so I have moved my rules over to JBoss Rules 5.0.2 and I find<br>
that this does not work any more.<br>
<br>
I have a declarative fact type as follows<br>
declare QuestionValidation<br>
question: String<br>
state: String<br>
mandatory: Boolean<br>
type: String<br>
end<br>
<br>
I have an "init" rule with high salience that inserts a number of<br>
QuestionValidations into the session.<br>
<br>
In order to test what is going on, I created a rule:-<br>
rule 'Test'<br>
dialect 'mvel'<br>
when<br>
$qv: QuestionValidation()<br>
then<br>
System.out.println( "QuestionValidation found " + $qv.getQuestion()<br>
+ "/" + $qv.getState() );<br>
end<br>
<br>
This rule never fires if I insert a QuestionValidation in the init rule!<br>
<br>
I can see the facts being inserted in the log as follows<br>
[#|2010-12-01T09:19:16.723+0000|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=70;_ThreadName=p:<br>
thread-pool-1; w: 7;|<br>
OBJECT ASSERTED value:QuestionValidation( mandatory=true, state=Closed,<br>
question=B2B_METER_SERIAL_NUMBER, type=string ) factId: 39|#]<br>
<br>
But I don't see any associated "ACTIVATION CREATED" for this object.<br>
<br>
However, if I insert a QuestionValidation fact created in Java by using<br>
kbase.getFactType("SWWB2BOutgoing", "QuestionValidation") then the Test<br>
rule gets fired just fine.<br>
<br>
Is there something I am missing? Do I need to to turn on rule chaining<br>
or something like that? (Surely chaining is on by default).<br>
<br>
Chris<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>