Re: [rules-users] Specify enumeration for DSL variables?
Thanks Esteban, I'd forgotten about your work on this :( On 17 August 2012 15:33, Esteban Aliverti esteban.alive...@gmail.comwrote: http://docs.jboss.org/drools/release/5.4.0.Final/drools-guvnor-docs/html_single/index.html#d0e1802 Best Regards, Esteban Aliverti - Blog @ http://ilesteban.wordpress.com On Fri, Aug 17, 2012 at 4:06 PM, jasonxzhong jason.zh...@ellucian.comwrote: Sure I'll explain. Assuming I have the following defined in a DSL: [consequence][]Set result {name} to {value} = data.results.put({name}, {value}); In the guided BRL rule editor, when I choose to use this DSL to add an action, the following is displayed Set rule flag [name] to [value] In this case data.results is a map that contains name/value pairs that can be set be the rules. My questions are: a. Can I attach a list of valid names to the {name} variable defined in the DSL? b. Is it possible to specify a list of valid values for the {value} variable based on the value of {name} defined in the DSL? For example if name==valid, {value} is in [true, false]. If name==code, {value} is in [1,2,3,4,5]. Or if a helper function can be used for this? Thanks, Jason -- View this message in context: http://drools.46999.n3.nabble.com/Specify-enumeration-for-DSL-variables-tp4019228p4019247.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Specify enumeration for DSL variables?
Eh? Can you please explain your requirement a bit more. On 17 August 2012 03:09, jasonxzhong jason.zh...@ellucian.com wrote: Is there a way to specify enumeration values or functions for variables in DSL definition? Thanks, Jason -- View this message in context: http://drools.46999.n3.nabble.com/Specify-enumeration-for-DSL-variables-tp4019228.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Specify enumeration for DSL variables?
Sure I'll explain. Assuming I have the following defined in a DSL: [consequence][]Set result {name} to {value} = data.results.put({name}, {value}); In the guided BRL rule editor, when I choose to use this DSL to add an action, the following is displayed Set rule flag [name] to [value] In this case data.results is a map that contains name/value pairs that can be set be the rules. My questions are: a. Can I attach a list of valid names to the {name} variable defined in the DSL? b. Is it possible to specify a list of valid values for the {value} variable based on the value of {name} defined in the DSL? For example if name==valid, {value} is in [true, false]. If name==code, {value} is in [1,2,3,4,5]. Or if a helper function can be used for this? Thanks, Jason -- View this message in context: http://drools.46999.n3.nabble.com/Specify-enumeration-for-DSL-variables-tp4019228p4019247.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Specify enumeration for DSL variables?
http://docs.jboss.org/drools/release/5.4.0.Final/drools-guvnor-docs/html_single/index.html#d0e1802 Best Regards, Esteban Aliverti - Blog @ http://ilesteban.wordpress.com On Fri, Aug 17, 2012 at 4:06 PM, jasonxzhong jason.zh...@ellucian.comwrote: Sure I'll explain. Assuming I have the following defined in a DSL: [consequence][]Set result {name} to {value} = data.results.put({name}, {value}); In the guided BRL rule editor, when I choose to use this DSL to add an action, the following is displayed Set rule flag [name] to [value] In this case data.results is a map that contains name/value pairs that can be set be the rules. My questions are: a. Can I attach a list of valid names to the {name} variable defined in the DSL? b. Is it possible to specify a list of valid values for the {value} variable based on the value of {name} defined in the DSL? For example if name==valid, {value} is in [true, false]. If name==code, {value} is in [1,2,3,4,5]. Or if a helper function can be used for this? Thanks, Jason -- View this message in context: http://drools.46999.n3.nabble.com/Specify-enumeration-for-DSL-variables-tp4019228p4019247.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Specify enumeration for DSL variables?
Thanks! This and the http://docs.jboss.org/drools/release/5.4.0.Final/drools-guvnor-docs/html_single/index.html#d0e1887 Advanced enumeration concepts in Guvnor would solve the dynamic enumeration requirement I posted earlier. -- View this message in context: http://drools.46999.n3.nabble.com/Specify-enumeration-for-DSL-variables-tp4019228p4019251.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Specify enumeration for DSL variables?
Is there a way to specify enumeration values or functions for variables in DSL definition? Thanks, Jason -- View this message in context: http://drools.46999.n3.nabble.com/Specify-enumeration-for-DSL-variables-tp4019228.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users