[rules-dev] Executing on a arbitrarily complex object

Anstis, Michael (M.) manstis1 at ford.com
Thu Feb 4 11:43:55 EST 2010


You could use the "from" keyword but your rules wouldn't work on *any*
arbitrary object - but this could be overcome if you could identify a
suitable super-class to extend for your arbitrary objects....

You should also direct this type of question at the user mailing list;
aimed at users of the framework rather than developers of it... You're
question would be open to a wider audience. 

-----Original Message-----
From: rules-dev-bounces at lists.jboss.org
[mailto:rules-dev-bounces at lists.jboss.org] On Behalf Of gazzaaa87
Sent: 04 February 2010 16:02
To: rules-dev at lists.jboss.org
Subject: [rules-dev] Executing on a arbitrarily complex object


Hi all,

I am using a StatelessKnowledgeSession and therefore call the execute
method
to invoke the rules engine. Having carried out a basic test, it would
appear
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 of
'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
behaviour
similar to cascade with JPA.

Any help or pointers much appreciated!

Dan
-- 
View this message in context:
http://n3.nabble.com/Executing-on-a-arbitrarily-complex-object-tp187271p
187271.html
Sent from the Drools - Dev mailing list archive at Nabble.com.
_______________________________________________
rules-dev mailing list
rules-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev



More information about the rules-dev mailing list