Rule Engine is a modern, scalable, and flexible rule engine built with Spring Boot 3 and Java 17. Execute complex business rules with MVEL expressions, manage rules dynamically, and scale with confidence.
// Dynamic Rule Evaluation
POST /beasre/v1/rule-engine/evaluate
{
"ruleName": "discount-calculator",
"parameters": {
"customerType": "PREMIUM",
"orderAmount": 1000
},
"payload": {
"items": [...],
"customer": {...}
}
}
// MVEL Expression
if (customerType == 'PREMIUM' &&
orderAmount > 500) {
discount = orderAmount * 0.15;
} else {
discount = orderAmount * 0.05;
}
return discount;
Built for modern applications with enterprise-grade features
Optimized rule execution with caching, compiled expressions, and efficient memory management.
Horizontal scaling support, distributed caching, and microservices-ready design.
OAuth2/JWT authentication, encrypted data storage, and comprehensive security controls.
Powerful MVEL expression language for complex business logic and dynamic rule evaluation.
Flexible document storage with automatic indexing, versioning, and backup support.
Comprehensive API documentation, extensive testing, and modern Java 17 features.
Layered architecture designed for maintainability and scalability
Get up and running in minutes
# Clone the repository
git clone https://github.com/BEAS-Software-Solutions/BEASRE.git
cd beas-rule-engine
# Build the project
mvn clean install
# Run the application
mvn spring-boot:run
# application.yaml
spring:
data:
mongodb:
host: ${MONGODB_HOST:localhost}
database: ${MONGODB_DATABASE:beasre}
cryptography:
key: ${CRYPTO_KEY}
iv: ${CRYPTO_IV}
# Evaluate a rule
curl -X POST http://localhost:8070/beasre/v1/rule-engine/evaluate \
-H "Content-Type: application/json" \
-d '{
"ruleName": "test-rule",
"parameters": {"amount": 100},
"payload": {"order": "12345"}
}'
Comprehensive API documentation with examples
Evaluate a rule with parameters and payload
{
"ruleName": "discount-calculator",
"parameters": {
"customerType": "PREMIUM",
"orderAmount": 1000
},
"payload": {
"items": [
{"id": 1, "price": 500},
{"id": 2, "price": 500}
]
}
}
{
"status": {
"message": "OK",
"status": "Validation Executed"
},
"response": 150.0
}
Comprehensive guides and references
Enterprise-grade security for your business rules
Secure API access with Keycloak integration and JWT token validation.
TripleDES encryption for sensitive data with configurable keys.
Fine-grained access control with user roles and permissions.
Comprehensive input validation and sanitization for all endpoints.
Have questions or need support?
contact@beassolution.com
https://beassolution.com
https://github.com/BEAS-Software-Solutions/BEASRE