Re: [rules-users] Formula error in Business Rule(Guided editor)
Hi, thanks for your reply. It worked wih $r.getInstallations() in formula. :) Now business rule looks like following : There is a RuleObject [$p] with: installations 10 THEN 1. Set value of RuleObject [$p] calulatedValue =$p.getInstallations()*3 -- View this message in context: http://drools.46999.n3.nabble.com/Formula-error-in-Business-Rule-Guided-editor-tp3979546p3987687.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] Formula error in Business Rule(Guided editor)
Hi, Currently I am facing following issue while inserting a formula in Business Rule(Guided Editor): 1) I have written following formula to be executed in Business Rule(Guided Editor): WHEN 1. The following exists: There is a RuleObject [$r] with: installations 100 THEN 1. Insert RuleObject: calulatedValue = $r.installations*3 But it gives error 'Unable to analyse expression' when i try to Verify the rule. I want my end result will be a calculated value instead of Literal value. Please let me know the correct syntax to use formula in this type of rule. Thnaks. -- View this message in context: http://drools.46999.n3.nabble.com/Formula-error-in-Business-Rule-Guided-editor-tp3979546.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] Formula error in Business Rule(Guided editor)
$r.installations only works if the attribute is public in RuleObject (and numeric). try $r.getInstallations() instead ... Also, always have a look to the generated DRL (View Source under Guvnor) - Mail original - De: Manasi manasi.a.da...@capgemini.com À: rules-users@lists.jboss.org Envoyé: Vendredi 11 Mai 2012 12:34:02 Objet: [rules-users] Formula error in Business Rule(Guided editor) Hi, Currently I am facing following issue while inserting a formula in Business Rule(Guided Editor): 1) I have written following formula to be executed in Business Rule(Guided Editor): WHEN 1. The following exists: There is a RuleObject [$r] with: installations 100 THEN 1. Insert RuleObject: calulatedValue = $r.installations*3 But it gives error 'Unable to analyse expression' when i try to Verify the rule. I want my end result will be a calculated value instead of Literal value. Please let me know the correct syntax to use formula in this type of rule. Thnaks. -- View this message in context: http://drools.46999.n3.nabble.com/Formula-error-in-Business-Rule-Guided-editor-tp3979546.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