Hi,
I am trying to evaluate using Drools in our EDM product. Our domain model is
very generic and complicated to be used as is as the fact model. Also new
domain entities will be added frequently and we would not want to write the
java fact model and supply the jar to the application (which needs
application bouncing...). So we may have to implement dynamic code
generation (using say javaassist).
Now I see that it can be partly achieved with the use of declarative fact
model (which does the dynamic code generation part for us).
But I have these questions -
When the rules fire, any update it makes on the fact needs to be updated
back onto our domain object obviously. Given that the fact model could be
potentially big, we were wondering
- if there can be anyway by which the application can be notified of
updates to the declared fact so we can copu only the changed attributes
backour domain object instead of copying all attributes back
OR
- if there was any way to introduce a dynamic proxy to the declared facts
so that the update (setXXX()) would have been called on the proxy which in
turn could update our domain object directly. As I see, this cannot be done
currently as the declarative facts are concrete classes and do not implement
any interface (its not possible to declare interfaces in drl files)
Is there any other better way to achieve this or should we go for dynamic
code generation in our application itself as mentioned in the beginning and
supply them as facts?
Thanks
Vidya
--
View this message in context:
http://drools.46999.n3.nabble.com/How-best-to-get-back-the-updates-that-r...
Sent from the Drools: User forum mailing list archive at
Nabble.com.