Understand the Rules Engine architecture
mainThe Rules Engine is designed to decouple business logic from the core application code. It allows rules to change without requiring code re-compilation or redeployment.
Key architectural components include:
- Rules Engine: The core library/NuGet package that evaluates rules against inputs.
- Rules Store: A storage mechanism for rules. While the engine requires rules to follow a specific schema, you can store them in any format or location (e.g., JSON files, Azure Blob Storage, Cosmos DB, or Azure App Configuration).
- Input: Dynamic data provided to the engine. Inputs can be typed objects or
ExpandoObjecttypes, allowing for highly flexible data models. - Wrapper: A custom implementation layer created by the developer that fetches rules from the Rules Store, converts them into the required
WorkflowRulesstructure, and passes them along with the Input to the Rules Engine.