File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Storing equations in XML?

 
Anthony Smith
Ranch Hand
Posts: 285
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I am really looking for an open source solution vs. creating anything to do this is possible. This is sort of related to a rules engine of some sort.

Let me just give an example.

I sell candy and I have three factors that make up your price:
Delivery
Weight
Type

If I deliver candy it will cost you a buck $1
If your candy weighs less than 1 pound I only charge you a buck $1
If your candy weighs 1 pound or more but less then 5 pounds I charge you $2
If your candy weighs 5 pounds or more but less than 10 pounds I charge you $2.50
If your candy weighs 10 pounds or more, I charge you $.75 a pound
If you want black candy it is $2, red is $3

You total cost for candy is the delivery charge the weight charge plus the type. If it equals over $5 than I will just charge you $5. SO $5 is the max that I will charge you.

I dont want to put this stuff in java code. I want to be able to update it from tiem to time w/o changing the code... ideas?
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anthony,

I read this post, not ignoring, but can't think of anything off the
top of my head right now.....

- m
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about trying out a real rule engine like one of these or Ernest's JESS?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic