Improve your rule constraints:
rule "..."
ruleflow-group "invoke"
salience 10
when
$web : WebService ( invoke == null )
then
Invoke inv = new invoke();
$web.setInvoke(inv);
update( $web );
insert(inv);
end
[]s
Edson
2008/5/12 psyduck <psyduck101(a)gmail.com>:
Thx for the response. But when i use the update(no dynamic facts), the
rule
keeps repeating himself for the same webservice object. I use no-loop but
that doesnt help.
rule "..."
ruleflow-group "invoke"
no-loop true
salience 10
when
$web : WebService ( )
then
Invoke inv = new invoke();
$web.setInvoke(inv);
insert(inv);
end
AllenABQ wrote:
>
>
> Are these dynamic facts you're working with? If they aren't (and at
least
> your new Invoke object is not), then try:
>
>
> then
> Invoke inv = new invoke();
> $web.setInvoke(inv);
> insert(inv);
> update($web);
> end
>
--
View this message in context:
http://www.nabble.com/Nullpointer-inserting-fact.-tp17100525p17189814.html
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com