No idea.. that piece of code works for me, using drools 5.0.1 :-/
2010/5/6 Antonio Neto
> Oi Miguel,
>
> when I try this in the "doMove" method using the "workingMemory" instead of
> "ksession" I got this error
>
> Exception in thread "main" java.lang.UnsupportedOperationException: this
> is i
Oi Miguel,
when I try this in the "doMove" method using the "workingMemory" instead of
"ksession" I got this error
Exception in thread "main" java.lang.UnsupportedOperationException: this is
implementedby StatefulKnowledgeImpl
at org.drools.reteoo.ReteooWorkingMemory.getFactHandles
(ReteooWor
Olá Antonio,
// retract all of it just in case
for (Object fact : ksession.getFactHandles()) {
ksession.retract((FactHandle) fact);
}
Hope this helps.
_ miguel
2010/5/5 Antonio Neto
> Hi,
>
> Thank you very much for all replies.
>
> I've tried also with not ( EPackage(...)), but the result
Hi,
Thank you very much for all replies.
I've tried also with not ( EPackage(...)), but the result is the same.
I think that I remove the EClass from the facts in my solution, but they
continue in my workingMemory.
How I can see the facts of the workingMemory object (and how remove it)?
Thanks
Hi Antonio,
Documentation states that the complement to "not" is "exists",whereas "not"
keyword is used to match the absence of a fact (in Working Memory), and
"exists" keyword is used to test the existence of one or more facts (in Working
memory).
So if you want to test that a fact is not in w
boun...@lists.jboss.org wrote on 05/05/2010 04:07:37 AM:
> [image removed]
>
> Re: [rules-users] how "exists" works exactly?
>
> Wolfgang Laun
>
> to:
>
> Rules Users List
>
> 05/05/2010 04:15 AM
>
> Sent by:
>
> rules-users-boun...@lists
One thing I've noticed is that
not (exists (EPackage( ) ) )
is a roundabout (and possibly inefficient) way of saying
not (EPackage( ... ) )
It's difficult (for me) to deduce what should happen in the rules as
the description of the
fact data isn't clear enough (for me).
-W
2010/5/5 Anton
Any idea? Please...
2010/5/4 Antonio Neto
> Hi all,
>
> I don't know exactly why I have a problem in my "exists" function. I've
> tried many different ways, but it does not work. Anybody could help me,
> please?
>
>
> I have the following rules:
>
> *rule "diff"
> when
> $var1: EReference(na
Hi all,
I don't know exactly why I have a problem in my "exists" function. I've
tried many different ways, but it does not work. Anybody could help me,
please?
I have the following rules:
*rule "diff"
when
$var1: EReference(name == "employee")
$var2: EClass(name == "Company", EAllRefere