[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1121) Operator field and the fact's variable field required in the "then" part of the rule
sreeni sabapathy (JIRA)
jira-events at lists.jboss.org
Mon Aug 27 02:02:18 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-1121?page=comments#action_12373928 ]
sreeni sabapathy commented on JBRULES-1121:
-------------------------------------------
Thank you for the quick response.
"=" would do the calculation, but calculation is based on values of other variables.
Here the rule itself does the calculation for the S.I, that is
SI = P*T*R/100
writing the above in drools 3.0 it would be
then
m.setSimpleInterest(m.getPrinciple()*m.getTime()*m.getRate()/100);
While considering the drools-jbrms, I am not able to look up the values of other variables in "then" part,
presently the calculation written in drools-jbrms is just
SI =100*6*5/100;
but I wanted to have it as
SI = P*T*R/100;
The above can be achieved through the option "Bussiness rule through dsl(text editor)". As jbrms is defined for not technical user ( Bussiness user ) I would appreciate if above facility is avaliable in "Bussiness rule (using guided editor)".
> Operator field and the fact's variable field required in the "then" part of the rule
> ------------------------------------------------------------------------------------
>
> Key: JBRULES-1121
> URL: http://jira.jboss.com/jira/browse/JBRULES-1121
> Project: JBoss Rules
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Eclipse IDE, drools-brms
> Affects Versions: 4.0.0.GA
> Environment: drools-jbrms stand alone and Eclipse drools-4.0.0
> Reporter: sreeni sabapathy
> Assigned To: Michael Neale
> Priority: Minor
> Fix For: FUTURE
>
> Original Estimate: 10 minutes
> Remaining Estimate: 10 minutes
>
> In the drools-jbrms standalone and even in the eclipse plugin version of "New guided drl file"
> the "then" part of the rule has the limitation of assigning the fixed value to the fact's variable.
> But in many condition the the value of the variable depends upon the value of another variable.
> I have taken a simple example for explanation.
> For calcluating simple interest
> SI = P*T*R/100
> Now in the rule file if the
> "when" condition as the check of " Calcluation type (simple ineterst or compound interest)"
> "then" part having SI,
> At the present drool-jbrms definition the
> "then" part has SI = text field.
> But my requirement is to look up the class variable "principle", "Time" and the "Rate" and then calculate, not just
> assign some fixed values.
> In a simple sentence I would appreciate if the drools- jbrms has the options related to "when" in the "then" part of the rule also.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list