Reusing predicates
by Kris Nuttycombe
Hi, all,
I have a set of rules where the LHS is essentially the same except for
a couple of additional conditions in each case. What is the best way
to factor out these common predicates? Should I simply create an
intermediate fact based upon the common set of conditions and then
reason with that fact, or is there a way of reusing them without
adding another fact to the mix?
Thanks,
Kris
16 years, 4 months
Problems with looping
by thomas kukofka
Hi, I used no-loop true but it still loops!!
Thomas
Hi
you must use "no-loop true" and the rule will be executed one for one
InputObject.
2008/8/1 thomas kukofka <thomaskukofka at
web.de<https://lists.jboss.org/mailman/listinfo/rules-users>
>:
> Hello,
>
> I have and less loop (the rule should only executed one for one
InputObject)
> in the follwing rule although I use "no-loop":
>
> rule "rulename"
> dialect "java"
> no-loop
> when
> io: InputObject (type == InputObject.Type.Typename)
> then
> io.setStringPropertyValue(InputObject.PROPERTYVALUE,
"somestring");
> update(oo);
>
> end
>
> I've read that I have to overwrite hashcode and equals, can this be the
> reason? If yes, do you have an example how to overwrite these methods?
>
> Thomas
16 years, 4 months
(no subject)
by thomas kukofka
Hi, I used no-loop true but it still loops!!
Thomas
Hi
you must use "no-loop true" and the rule will be executed one for one
InputObject.
2008/8/1 thomas kukofka <thomaskukofka at
web.de<https://lists.jboss.org/mailman/listinfo/rules-users>
>:
> Hello,
>
> I have and less loop (the rule should only executed one for one
InputObject)
> in the follwing rule although I use "no-loop":
>
> rule "rulename"
> dialect "java"
> no-loop
> when
> io: InputObject (type == InputObject.Type.Typename)
> then
> io.setStringPropertyValue(InputObject.PROPERTYVALUE,
"somestring");
> update(oo);
>
> end
>
> I've read that I have to overwrite hashcode and equals, can this be the
> reason? If yes, do you have an example how to overwrite these methods?
>
> Thomas
**
16 years, 4 months
Problems with looping
by thomas kukofka
Hello,
I have and less loop (the rule should only executed one for one InputObject)
in the follwing rule although I use "no-loop":
rule "rulename"
dialect "java"
no-loop
when
io: InputObject (type == InputObject.Type.Typename)
then
io.setStringPropertyValue(InputObject.PROPERTYVALUE, "somestring");
update(oo);
end
I've read that I have to overwrite hashcode and equals, can this be the
reason? If yes, do you have an example how to overwrite these methods?
Thomas
16 years, 4 months