How to connect Jboss BRMS (6.4.0.GA) to any database

261 Views Asked by At

I have a SQL Server database with a Person table and I want to load a list of these people from the database to an Arraylist or List in the BRMS to apply the rules. how can I do this?

1

There are 1 best solutions below

0
On

The best practice is to delegate the data retrieval logic to the caller. The pattern should be:

  1. Retrive the data from a DB or whatever
  2. Fill in the data in the Working Memory
  3. Fire the rules
  4. Collect the results
  5. Depending on the application you can use the results to update a DB

The BRMS has the ability to retrieve data in the rule logic but it should be considered a bad practice, or something to do when no other options are available (really rare case, in rare situation). Otherwise, the BRMS performances will be terrible and the overall code really hard to maintain.