[rules-users] Inserting (asserting) objects during LHS evaluation - side effects?
Mark Proctor
mproctor at codehaus.org
Tue Apr 22 07:08:14 EDT 2008
no you can't do this.
Mark
Lance Arlaus wrote:
> All-
>
> What are the potential side effects of asserting objects during LHS
> evaluation, specifically a FROM clause?
>
> For example, using the example from the docs, let's assume that the
> zipcode property is in fact a field that's calculated via business
> rules. So, I'd like to perform just-in-time insertion of the person's
> address and perhaps other objects as well necessary to the calculation.
>
> In other words, I'd like to implicitly assert objects on-demand as
> they're needed. For the curious, this is something that's possible in
> Blaze Advisor using their is-needed rules, and for which I'm attempting
> to find a corresponding capability in Drools.
>
> I guess it comes down to the question of whether insertObject() is
> reentrant. Anybody have a clue? Or another way of approaching this?
>
> For reference, here's the documentation example using the from clause:
>
> rule "validate zipcode"
> when
> Person( $personAddress : address )
> Address( zipcode == "23920W") from $personAddress
> then
> # zip code is ok
> end
>
>
>
> _______________________________________________
> 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