We are going to cover some of the core concepts that you will need to be familiar with when working with the Enigma Rules Engine.
We will start with the repository. A repository is where all the rules and other data needed by the Rules Engine are stored. The repository interface is relatively simple. The Rules Engine includes the ability to use a filesystem directory or a zip file as a repository. If your needs are more complex, then you can implement your own repository format with ease, such as a versioned database.
Now the Enigma Rules Engine is built on top of Windows Workflow Foundation. Therefore, we use Activities from the System.Activities namespace to build our business rule logic. The Rule Editor, by default, lists the most common activities that you will use. Some, such as the Assignment activity are stand-alone. Others, such as the If activity contain child activities as part of their logic. If the default list of activities is not sufficient for your purposes you can customize the Rule Editor to display more advanced activities such ParallelForEach. You can also implement and import your own custom activities.
Next, the Execution Plan is the entry point into the repository. It defines any arguments passed into and out of the rules. It can also be used to define variables that are shared among the rules. In addition, it can perform any processing necessary before or after execution of the rules. By default, the execution plan accepts no arguments and executes all of the rules with no pre or post processing. There is one special activity that can only be used inside the ExecutionPlan and that is the RulesContainer. The RulesContainer activity will execute each rule, one after the other, until they are all complete.
Then we have rules. Rules contain our business logic. They typically interact with the rest of the system by modifying the objects passed into or returned from the Rules Engine. However, since you can implement custom activities they can also be used to make database calls, call WCF services, or anything else you might need.
Finally we have assembly references. References can be used to include custom activities in our repository. They can also be used to give activities access to custom types.