8:00 – 1:30, 3:30 -6:00 CSIP
- Ok ,now that we have working(?) code, I have something to walk through while reading the book.
- The Drools team suggests that you use the joda DateTime library. It looks pretty nice, too – http://joda-time.sourceforge.net/. They also have a bunch of other interesting libraries at http://joda.sourceforge.net/
- Setting a global value in a rule
- Java
// Import the class import droolsbook.bank.service.BankingInquiryService; // create the session static StatelessKnowledgeSession session; // create rule engine KnowledgeBaseConfiguration configuration = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(configuration); // declare our global BankingInquiryService inquiryService = new BankingInquiryServiceImpl(); // make a session session = knowledgeBase.newStatelessKnowledgeSession(); // add the global to the session session.setGlobal("inquiryService", inquiryService); - Drools rule (.drl file)
// import import droolsbook.bank.service.*; // declare global BankingInquiryService inquiryService; // use the global in a rule (note the surrounding eval(), which can evaluate any code that returns a TRUE or FALSE). rule "accountNumberUnique" when $account : Account(eval(!inquiryService.isAccountNumberUnique($account))) then error(kcontext, $account); end - Chapter 4
- Hmm. com.ibatis.sqlmap.client.SqlMapClient looks interesting.
- After poking around, I think I found something better. Castor appears to do XML/SQL/other(?) data binding with Java. IBM appears to have a nice set of articles.
- And Hibernate may now be able to do this as well.
- Nice data visualization using webGL

