I would like to embed JESS in my java program (i mean not to program in .clp script file). But i would like to store all the rules in one text file. The flow of the program is as below:
1. get user name, address, phone no. by using JTextField in my java program
2. JESS or my java program will open the rule text file.
one example of the rules would be like this:
(defrule John-data
(name John)
(address john'sAddress)
(phone john'sPhone)
->
(assert (user John)))
(defrule John-data
(name John)
(address john'sAddress)
(phone john'sPhone)
->
(assert (user John)))
3. JESS will use the input data and do the matching with the rules to get the user's total payment.
4. My java program will use the "user" variable asserted by JESS and produce the result in GUI to the user.
5. And possibly user could add a new rule (for a new user) into the rule text file.
Is this possible to do? It is highy appreciated if somebody could give a guide for my idea or any better suggestions.
regards,
irejai
