[rules-users] Any easy way to avoid inserting same id object into memory?
Sonata
plz.write.to at gmail.com
Thu Dec 5 01:18:21 EST 2013
Hi, I have a rule that on its RHS, it creates new objects with random content
and inserts them.
How do you check if the object already exists in drools memory?
I am thinking to use kcontext.getKnowledgeRuntime().getObjects() in the RHS
to loop for all the objects and stop inserting if an object with same
content exists.
Is there any better way?
May be like using query?
Drools ver is 5.5.0.Final
Thank you
--
View this message in context: http://drools.46999.n3.nabble.com/Any-easy-way-to-avoid-inserting-same-id-object-into-memory-tp4027102.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list