Rule-based reasoning is a discipline of artificial intelligence that models its problem solving approach around the way doctors and others solve diagnostic problems, using "rules of thumb" to make inferences and then using the additional information to reach new conclusions.

Rule-based systems are powerful because they separate knowledge and rules from the program("inference engine"), which makes it easier to maintain business logic. Rules are stored in repositories that have readable rules that business users can reference and maintain.

These systems have been popular in the mortgage industry where there are many if/then rules for determining whether borrowers can qualify for loans, and that is the example that I created, although Dream Rules was designed to work around any Salesforce SObjects.

I haven’t seen"rule engines" in the AppExchange, in spite of the tremendous need for business to make sense of their overload of data. It would be great to have a tool that inspects and reasons against data in Salesforce objects guided by an intelligent system.

Salesforce does have workflow rules, but they are more like triggers and don't support reasoning. The lack of these systems is probably due to the governor limits and the high resource needs to solve many problems. The new Salesforce Queueable Interface should help alleviate problems, so I thought the time had come to start building "Dream Rules". Also, calling Apex code from Visual Flows opens more possibilities.

My target user would probably be a Salesforce admin or developer. They would create a knowledge base which houses an object description of the problem domain. It also houses rulesets, which are groups of rules used for one problem. Rules are composed of conditions and actions.

What I'm most proud of is how much I built from scratch over the weekend, especially as a one person team. Much of that is due to the power of Salesforce1. Although the system isn't full-featured, this is a very difficult problem, and commercial systems have six figure price tags, so I think I did a respectable job.

The object model is in place, and many of the data entry screens were assembled and linked using Apex, VisualForce, CSS, JQuery, and Salesforce Mobile Design Templates.

Some screens for rule construction were skipped since data could be entered in Salesforce, and the problem had to be done in a weekend. The inference engine loads all the data and constructs a world of Apex objects for reasoning, but there is a lot of opportunity for future enhancements.

Overall, I had a great time, and I hope you like what you see. My dev org ID is: dreamrules@hack.com . Thank you, Steve

Share this project:

Updates