So, what's the problem with that approach? You are binding a variable in the LHS and using it in the RHS, that should work as expected. If you make that variable change, let's say use different strings or enums for the "exposure type" you should be fine.
Cheers On Fri, Nov 30, 2012 at 3:08 PM, Stephen Masters <stephen.mast...@me.com>wrote: > Apologies for the overly brief explanation ... am at a bank where only > internet access is on my phone. Additional apologies if I suffer from > auto-correct errors. :) > > [condition][] validate "{exposureType:ENUM:exposure types}" = > AccountExposure($exp : {exposure type}); > > [consequence][] Create limit check = insert(new LimitCheck($exp); > > Now, dependent on what exposure type I select, I need to use a different > value to perform conversions between amounts and percentages. So it would > keep things clean if I could pass the property name selected in the LHS to > the object inserted on the RHS. > > I could do it by having different DSL phrases for consequences, but my > audience is very non technical so I'm trying to keep the language as > minimal as possible. > > Hope that explains it! > > Steve > > > > Mauricio Salatino <sala...@gmail.com> wrote: > > Hi Steve, > Can you please gives us an example about what are you trying to achieve? > Setting a variable in the LHS doesn't make sense for the common use cases. > What we usually do is to bind a variable to a field from our facts, but > that's it. > > Cheers > > > On Fri, Nov 30, 2012 at 2:10 PM, Stephen Masters > <stephen.mast...@me.com>wrote: > >> >> >> Stephen Masters <stephen.mast...@me.com> wrote: >> >> >Hi folks, >> > >> >I'm trying to set up rules where the RHS is able to refer to a value set >> in the LHS so that it can perform its logics slightly differently. >> > >> >I'm able to use $var to pick out fields from facts in working memory. >> However as far as I can tell I'm not able to set a new value. >> > >> >I'm setting up a DSL to drive guided rules in guvnor and in the RHS I >> need to know which value was picked from a drop down list in the LHS. >> > >> >Cheers >> > >> >Steve >> _______________________________________________ >> rules-users mailing list >> rules-users@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > - MyJourney @ http://salaboy.wordpress.com > - Co-Founder @ http://www.jugargentina.org > - Co-Founder @ http://www.jbug.com.ar > > - Salatino "Salaboy" Mauricio - > > > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > -- - MyJourney @ http://salaboy.wordpress.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino "Salaboy" Mauricio -
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users