• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Storing equations in XML?

 
Ranch Hand
Posts: 285
  • 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?
 
Ranch Hand
Posts: 5040
  • 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
 
author
Posts: 11962
5
  • 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?
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!