473,659 Members | 2,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

possible 2 create rules engine w/ XML instead of C#?

I have 6 rules for a given 'time' value.

if (0 < iTime <= .5) {iFee = 17}
else if ( .5 < iTime <= 1) {iFee = 20}
else if...
else if...
yada yada

I don't want to code this in C# within my application, or a web service,
because then I have to recompile everytime a user decides to tweek the rules
above. I was thinking that I could create a javascript function and have
the .NET app call it, passing in the iTime, and getting back iFee.
But Javascript is a pain to work with. I'm wondering -- if there's a
derivation of XML -- that can do this. Pass in a value, get back something
else: a rules engine thats easy to modify.

TY for any advice
Jason Shohet


Nov 15 '05 #1
2 1699
If the rules are as simple as the example then all you need to store in the
config file is the break levels and the associated fee. The logic engine
can remain in your compiled code as it doesn't actually change - only the
values it uses do.

" Jason Shohet" <as****@hotmail .com> wrote in message
news:uz******** ******@TK2MSFTN GP09.phx.gbl...
I have 6 rules for a given 'time' value.

if (0 < iTime <= .5) {iFee = 17}
else if ( .5 < iTime <= 1) {iFee = 20}
else if...
else if...
yada yada

I don't want to code this in C# within my application, or a web service,
because then I have to recompile everytime a user decides to tweek the rules above. I was thinking that I could create a javascript function and have
the .NET app call it, passing in the iTime, and getting back iFee.
But Javascript is a pain to work with. I'm wondering -- if there's a
derivation of XML -- that can do this. Pass in a value, get back something else: a rules engine thats easy to modify.

TY for any advice
Jason Shohet

Nov 15 '05 #2
Dan,

But if I just store the break level, .5, it doesn't tell me if the fee
associated with that is less than, less than or equal, or more than .5.
What if the user decides "I want from 0 to .5 hrs -- not including 5, to be
$17. And .5 to 1 hr to be 20." -- Before it was less than or equal to .5,
now its become less than .5, and if the time equals .5 itself, it goes to
the next tier. This could happen.
If I just store the break values in there I don't have good control, I
somehow need to store the evaluators (<, > etc).

VR,
Jason Shohet
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
3040
by: Robert Brown | last post by:
suppose I have the following table: CREATE TABLE (int level, color varchar, length int, width int, height int) It has the following rows 1, "RED", 8, 10, 12 2, NULL, NULL, NULL, 20 3, NULL, 9, 82, 25
6
2565
by: Chris Travers | last post by:
Hi all; I am using PostgreSQL 7.4 on RedHat 9, though I don't think that is important to this problem. I am attempting to write a rule that will check to see whether certain conditions are right for a SELECT query and abort the query of those connections are not right. In this case, I am trying to do additional permissions enforcement. I have written a function to do the checking, but when I create the rule, I get an error. So here...
3
23088
by: Ian Boyd | last post by:
i know nothing about DB2, but i'm sure this must be possible. i'm trying to get a client to create a view (which it turns out is called a "Logical" in DB2). The query needs a LEFT OUTER JOIN, but he doesn't know how to do that, or even if he can, and i don't have to time to learn DB2 from scratch right now. The following SQL Query is a trimmed sample of the full View (i.e. Logical) definition - and i would create it on an SQL based...
0
1166
by: John Puopolo | last post by:
All, I am writing an application that requires a very light weight rules engine. The core requirement is for me to express a simple rule such as: If the value of X > 100, send an e-mail else send a message to a pager I can do this various ways, e.g., emit code at runtime, etc., but I was hoping to find a lightweight engine that allows me to express rules simply
11
2597
by: hazz | last post by:
before I start filling up the first page of perhaps many pages of code with if/then or switch:case buckets, I wanted to step back and see if there is a better way... I will have a table with up to 300 rules in it. Maybe more... In each Score table there is a column which will refer to a domain specific table and another table column that contains the property of that domain specific object. IceCream is a domain and scoops is a property I...
11
2539
by: Brent Ritchie | last post by:
Hello all, I have been using C# in my programming class and I have grown quite fond of C# properties. Having a method act like a variable that I can control access to is really something. As well as learning C#, I think that it's way overdue for me to start learning C++ Templates (I've been learning it for about 5 years now). I think that adding this type of functionality would be a good exercise to help learn template programming....
5
4875
by: Michal Taborsky | last post by:
Hello. We are currently facing a design issue, which I am a bit stuck with. We are talking about row-level access regulation. I'll make it clear with an example. Let there be a table of products: CREATE TABLE products (
13
2537
by: Alison Givens | last post by:
....... that nobody knows the answer. I can't imagine that I am the only one that uses parameters in CR. So, my question again: I have the following problem. (VB.NET 2003 with CR) I have a report with a multiple-value discrete value and a rangevalue. The report shows fine in the viewer, but when I hit the export to pdf
2
1037
by: Wolf Saenger | last post by:
Hi, Is Sombody using a Business Rule Manager System? Is there a affordable system to recomended? You opinion please tia / regards Wolf
0
8339
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8751
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7360
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4338
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2757
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.