O'Reilly logo

Drools JBoss Rules 5.0 Developer's Guide by Michal Bali, Bogdan Brinzarea

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementation of the data loading

In this section, we'll look closer at getting the data from the legacy system. If you're not interested in trying out this example, you can skip this section.

Database setup

The data can come from various sources – database, XML, CSV, and so on. Our application will pull data from a database, however it shouldn't be a problem to work with any other data source. The table structure looks as follows:

CREATE TABLE  'droolsBook'.'customer' ( 
  'customer_id' bigint(20) NOT NULL, 
  'first_name' varchar(255) NOT NULL, 
  'last_name' varchar(255) NOT NULL, 
  email' varchar(255) NOT NULL, 
  PRIMARY KEY  ('customer_id') 
)

Code listing 25: Table structure for legacy customers in a MySQL Database.

CREATE TABLE 'droolsBook'.'address' ( 'address_id' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required