Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Edubuntu User (http://www.linux-archive.org/edubuntu-user/)
-   -   java business rule tool (http://www.linux-archive.org/edubuntu-user/97398-java-business-rule-tool.html)

Uwe Geercken 05-29-2008 11:45 AM

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:

<xml>
<group id="group_1" description="rule groups to check airport record
consistency">
<subgroup id="subgroup_1" description="check icao code"
ruleoperator="and">
<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">
</execute>
<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" />
</rule>
...
</subgroup>
<subgroup id="subgroup_1" description="check lat-long values"
intergroupoperator="and" ruleoperator="and">
...
<rule id="rule_longitude_0" description="check for
correct longitude
value">
<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">
</execute>
<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" />
</rule>
</subgroup>
</group>
</xml>

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:
http://datamelt.com/java-datamelt/jare_v0.51.pdf
the package (including docu):
http://datamelt.com/java-datamelt/jare_ruleengine_0.51.zip

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.

rgds,

uwe



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


All times are GMT. The time now is 12:28 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.