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

Wolfgang Laun wolfgang.laun at gmail.com
Mon May 7 01:37:31 EDT 2012


On 06/05/2012, 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.

Check the topic "Query" in the "Expert" manual. Also, you need not
insert; you could use a global (java.util.List) variable (again:
"Expert") for collecting these objects.

> 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.

Sigh. You are asking absolutely basic questions. How about reading the
"Expert" manual and studying the examples? You won't be able to avoid
this, and the earlier you do it, the better.

There is no loss of data except for inserting equal facts in a
non-default operational mode for your session.

-W

>
> 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
>


More information about the rules-users mailing list