Tag Archives: Rules Engine Data Mapping

LiveRules mapping with RDBMS

LiveRules unique way of loading the data from any Java supported Relational Database Management System (RDBMS) is as simple as doing some mapping using our web-based administrator module. Once you give the database details, LiveRules automatically connects to your database and enables you to do the mapping to your business names which can then be used within the rules when you author them.

For example, let us consider that you have a customer who has multiple address in your RDBMS. Let us look at the sample table structure below.


customer
---------
cust_id (PK)
cust_fname
cust_lname
cust_dob
cust_gender


customer_address
-----------------
cust_addr_id (PK)
cust_id (FK)
cust_addr_type (H - home, O - Office, etc)
cust_addr1
cust_addr2
cust_city
cust_state
cust_zipcode
cust_country

If you had to load these two table data through SQL for a given “customer id” and feed in a data object and then pass them to a Rules Engine is going to take a while.  It involves a lot of coding from the developer and of course, you can be worried about defects and thus cost you a lot of time and money with time and other resources.

  1. Build the customer and customer address objects
  2. Write the query and loop through and populate these objects
  3. Go to the rules engine and then configure your objects to a business name
  4. Load the objects and invoke the rules engine with the data objects
  5. Get the results

What if someone says that don’t worry about anything, just do the database to business field name mapping and pass the customer id to get the results. Is that awesome and saves you a lot of time, money and resource?

Of course they definitely save a lot of development time, maintenance time and of course use the resource time for something really productive.

This is where LiveRules makes the difference in 3 simple steps.

  1. Give the database details and do the business name mapping to each of your table columns (as needed).
  2. Author your rule using the business names that you have just created
  3. Invoke the rules engine with the customer that you like to process the rule for (by sending the value for customer id)

The savings are endless when you have more complex tables and columns. LiveRules just of the box enables the mapping and gives you a jump-start for business.