FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Edubuntu User

LinkBack Thread Tools
Old 05-29-2008, 11:45 AM
Uwe Geercken
Default java business rule tool

hello all together,

I have created a business rule engine already some month ago, but I
haven't had a lot of feedback so far. anyway, I thought that one or
the other of you might be interested. excuse me if you feel it is a
little bit off-topic.

the basic idea is, to have e.g. a text file (or database) with some
records and to define some test/checks in an xml format and then check
the rules against the file. you can put multiple rules together to
form groups and subgroups.

the program is written in java and comes with an example script and
data and documentation. so if you have java on your machine, you can
download the package, extract the files and run the sample.

here is an example of the data (airports):

KABE;LEHIGH VALLEY INTL;00393;N40390750;W075262690
KABI;ABILENE RGNL;01791;N32244075;W099405483
KABR;ABERDEEN RGNL;01302;N45265660;W098251860
KABY;SOUTHWEST GEORGIA RGNL;00197;N31320785;W084114010
KACK;NANTUCKET MEM;00048;N41151099;W070033665
KACT;WACO RGNL;00516;N31364064;W097134987

and here are some rules/tests:

<group id="group_1" description="rule groups to check airport record
<subgroup id="subgroup_1" description="check icao code"
<rule id="rule_icao_1" description="check for correct
icao code spelling">
<object classname="Row" method="getField" type="string"
parameter="0" parametertype="integer"/>
<expected value="[A-Z]{4}" type="string"/>
<execute value="com.datamelt.rules.implementation.CheckMatc hes">
<message type="failed" text="ICAO code field of $1 does
not match
to expected value: $0" />
<message type="passed" text="Correct match of ICAO code field to
expected value: $0" />
<subgroup id="subgroup_1" description="check lat-long values"
intergroupoperator="and" ruleoperator="and">
<rule id="rule_longitude_0" description="check for
correct longitude
<object classname="Row" method="getField" type="string"
parameter="4" parametertype="integer"/>
<expected value="[WE][0-9]{9}" type="string"/>
<execute value="com.datamelt.rules.implementation.CheckMatc hes">
<message type="failed" text="Longitude field $1 does
not match to
expected value: $0" />
<message type="passed" text="Correct match of longitude field to
expected value: $0" />

as you are all IT experts, I guess you get the point of the xml file.

maybe you can use it during your training classes and share it with
your students. everything is free of course and you can get the source
code on request from me.

the documentation is available here:
the package (including docu):

as I put a lot of effort in it, I would be happy if at least one
person except me finds it useful.

tks. also for feedback.



edubuntu-users mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/edubuntu-users

Thread Tools

All times are GMT. The time now is 01:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org