It seems I am unable to insert a new fact from within a drl function. I tried 
this:

////////////////////////
package com.sample

declare Dummy
end

function void init() {
        insert(new Dummy()); // Doesn't compile
}

rule "init"
salience 999
when
then
        init();
        insert(new Dummy()); // Compiles
end

////////////////////////

Is the above supposed to work?

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to