[rules-users] Updating a user defined error object using drools

Michael Anstis michael.anstis at gmail.com
Sun May 6 15:46:27 EDT 2012


My suggestion would be:

1) Ensure you have read the Drools Expert user-guide
2) Insert a new Error fact for each validation error you find (possibly
associating the original domain object with the error, it's up to you)
3) Use a Query to retrieve Error objects.

sent on the move

On 6 May 2012 20:14, "Ini" <inder.14 at gmail.com> wrote:

> Thanks laune...what i understood from the code that you have written is :
> we write rules where we are checking for employee department if its null
> then create the new error object and set the values of all the properties
> and then call the insert(e)...
> how have few more queries on this:
>
> 1. How to retrieve the updated error object in java class from where i am
> triggering the rules.
> 2. In case if i have check for another property say employeeName and if it
> is null again create a new error object and call insert(e). in this case
> will the previous error object be lost if not how will retrieve these two
> error objects back in my calling class.
>
> Thanks,
> Ini
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Updating-a-user-defined-error-object-using-drools-tp3966631p3966838.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120506/76d1a9f4/attachment.html 


More information about the rules-users mailing list