Have you considered using the "from" Conditional Element, which lets you
reason over components of a fact's collection-type element, without them
being inserted as facts. See the Drools Expert manual for details.
On Thu, Feb 4, 2010 at 5:01 PM, gazzaaa87 <dan_hopwood(a)hotmail.co.uk> wrote:
I am using a StatelessKnowledgeSession and therefore call the execute
to invoke the rules engine. Having carried out a basic test, it would
that calling execute on an arbitrarily complex object does not insert child
objects, rather rules will only fire if they are based on the parent.
e.g. let's say you have a class called 'Father', which holds a collection
'Child' objects. By calling session.execute(fatherObject) I need rules to
fire that use the Child pattern without having to loop through 'insert'ing
all the child elements manually.
Has anyone come across a way around this? The only thing I managed to find
was the use of a Batch Executor but you have to set that up before calling
execute and therefore it's still effectively a manual process.
If only Drools used java annotations, it would be ideal to specify
similar to cascade with JPA.
Any help or pointers much appreciated!
View this message in context:
Sent from the Drools - Dev mailing list archive at Nabble.com
rules-dev mailing list