So, you have a small application with 40 or 50 tables. You have how many business rules, do you think? A few hundred? That would be only 6 or 7 per table.

And now something goes wrong.

Where do you look?

That's where the Business Rule Manager comes into play. 

It works like this:

  1. You define the business rule, giving it a name, e.g., "When Location Type is Warehouse, show Locations" and a fuller description if needed.
  2. You decide where to implement this rule: bring up a tree of your app, you select the object, or a number of objects, that should be affected by this rule with the same action. You can also select tables and fields from the data model, to have the action you are about to select to follow the data wherever it is used.
  3. You then select an action from a list, in this case "Make Visible Only When"
  4. You then write an expression that returns .T. when the condition is met, using the built-in editor in the Business Rule Manager.
  5. You can then, for the same Business Rule, use the same object(s), or select a new object or object list, and applied another action: whatever is needed to satisfy that business rule.
  6. You can then describe How To Test.
  7. If applicable, you can also add a test script. The business rule manager will collect test scripts, run them, and display the results when you decide it's time to do that. Or you can schedule it as a job to run based on criteria you specify.

Hint: if you write your custom software development contract based on what rules will be implemented, you will find a few things happen:

  1. Your customer won't be able to tell you what the business rules are until you've created the application. Solution: write the contract with whatever the customer has, and set expectations that there will be additional contracts based on their needs discovered when they are using the application.
  2. You won't lose money on the contracts.
  3. You will save your customer time.
  4. Your customer will get what they want.

Doesn't this make more sense than putting rules everywhere around your application? All the other parts of the Metadata Management System for Lianja build up to this, the part where you accomplish your task, to develop a piece of software that helps people do their job efficiently and effectively. And without all those other parts, this part isn't possible.