Thanks Tony, this definitely looks interesting. I'm trying to figure out if I 
can use this for my requirement.

Thanks,
Yogesh




________________________________
From: tonylu880042 <tonylu880...@gmail.com>
To: users@appfuse.dev.java.net
Sent: Wednesday, February 11, 2009 8:02:27 PM
Subject: Re: [appfuse-user] Mathematical formula implementation in Java/JEE


Hi,
I would like suggest you to use the GroovyShell from Groovy project.
I use this in my web action for providing some rule customization just like
your case.
The advantage of using GroovyShell() is you can put your Java data model
into GroovyShell and execute your script(Mathematical formula which is coded
in Java form).
Or, you can using the dynamic bean in Spring for further detail please check
out my blog in the following link.
http://tony880042.blogspot.com/2008/08/how-to-add-scripting-support-in-your.html
http://tony880042.blogspot.com/2008/08/how-to-add-scripting-support-in-your.html
 



Yogesh Bhardwaj wrote:
> 
> Hello all,
> 
> This question is not related to AppFuse so please pardon me, but since
> there are so many developers from open source community here, just thought
> of getting some opinions. We have a business requirement in which the end
> users would create mathematical "formulae" through a UI. So in a single
> transaction, a user could create a formula, apply it on the transactional
> data, and save the formula for future use. The operands in a formula would
> be attributes of certain objects, and the operators could potentially go
> beyond just simple algebraic operators. An example could look like this:
> 
> if (object.country == "USA")
> then output = (object.normalRate * (@someConstant + #someUserInput)) /
> object.quantity
> else output = (object.exciseRate * @someConstant) / object.quantity
> 
> The "decision-making" behavior of the formula inclines me towards using
> some rules engine like JBoss Rules/Drools. Does anyone here know if JBoss
> Rules or any other rules engine would fit for a requirement like this,
> where rules could be created dynamically through a UI and then saved (file
> or database) or users could select a rule among several available ones?
> 
> I would really appreciate any feedback.
> 
> Thanks,
> Yogesh
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Mathematical-formula-implementation-in-Java-JEE-tp21957774s2369p21967953.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
For additional commands, e-mail: users-h...@appfuse.dev.java.net


      

Reply via email to