All Projects → andbi → evrete

andbi / evrete

Licence: MIT License
Evrete is a lightweight and intuitive Java rule engine.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to evrete

NiFi-Rule-engine-processor
Drools processor for Apache NiFi
Stars: ✭ 34 (-8.11%)
Mutual labels:  rule-engine, rules-engine
Rulette
A pragmatic business rule management system
Stars: ✭ 91 (+145.95%)
Mutual labels:  rule-engine, rules-engine
rools
A small rule engine for Node.
Stars: ✭ 118 (+218.92%)
Mutual labels:  rule-engine, rules-engine
powerflows-dmn
Power Flows DMN - Powerful decisions and rules engine
Stars: ✭ 46 (+24.32%)
Mutual labels:  rule-engine, rules-engine
Nrules
Rules engine for .NET, based on the Rete matching algorithm, with internal DSL in C#.
Stars: ✭ 1,003 (+2610.81%)
Mutual labels:  rule-engine, rules-engine
Easy Rules
The simple, stupid rules engine for Java
Stars: ✭ 3,522 (+9418.92%)
Mutual labels:  rule-engine, rules-engine
liteflow
Small but powerful rules engine,轻量强大优雅的规则引擎
Stars: ✭ 1,119 (+2924.32%)
Mutual labels:  rule-engine, rules-engine
Node Rules
Node-rules is a light weight forward chaining rule engine written in JavaScript.
Stars: ✭ 481 (+1200%)
Mutual labels:  rule-engine, rules-engine
Json Rules Engine
A rules engine expressed in JSON
Stars: ✭ 1,159 (+3032.43%)
Mutual labels:  rule-engine, rules-engine
naive-rete
Python RETE algorithm
Stars: ✭ 51 (+37.84%)
Mutual labels:  rule-engine, rete
TabInOut
Framework for information extraction from tables
Stars: ✭ 37 (+0%)
Mutual labels:  rule-engine
rule-engine
基于流程,事件驱动,可拓展,响应式,轻量级的规则引擎。
Stars: ✭ 165 (+345.95%)
Mutual labels:  rule-engine
cs-expert-system-shell
C# implementation of an expert system shell
Stars: ✭ 34 (-8.11%)
Mutual labels:  rule-engine
neat-form
Build form on Android using JSON schema; also includes view validation and skip logic.
Stars: ✭ 56 (+51.35%)
Mutual labels:  rules-engine
claire
Continuously Learning Artificial Intelligence Rules Engine (Claire) for Smart Homes
Stars: ✭ 18 (-51.35%)
Mutual labels:  rule-engine
EngineX
Engine X - 实时AI智能决策引擎、规则引擎、风控引擎、数据流引擎。 通过可视化界面进行规则配置,无需繁琐开发,节约人力,提升效率,实时监控,减少错误率,随时调整; 支持规则集、评分卡、决策树,名单库管理、机器学习模型、三方数据接入、定制化开发等;
Stars: ✭ 369 (+897.3%)
Mutual labels:  rule-engine
rules
One Framework to build a highly declarative and customizable UI without using templates.
Stars: ✭ 38 (+2.7%)
Mutual labels:  rules-engine
mmqtt
An Open-Source, Distributed MQTT Broker for IoT.
Stars: ✭ 58 (+56.76%)
Mutual labels:  rule-engine
business-rules-motor-insurance
Hyperon - Motor Insurance Demo App. This is a sample application to demonstrate capabilities of Hyperon.io library (Java Business Rules Engine (BRE)/Java Pricing Engine). The application demonstrates responsive quotations for Car/Motor Insurance based on decision tables and Rhino functions (for math calculations). It shows different possible bus…
Stars: ✭ 16 (-56.76%)
Mutual labels:  rules-engine
SFDCRules
Simple yet powerful Rule Engine for Salesforce - SFDCRules
Stars: ✭ 38 (+2.7%)
Mutual labels:  rule-engine

Evrete

GitHub repo size GitHub stars

Evrete is a forward-chaining Java rule engine that implements the RETE algorithm and is fully compliant with the Java Rule Engine specification (JSR 94).

Historically designed as a fast and lightweight alternative to full-scale rule management systems, the engine also brings its own mix of features:

  1. Rule authoring
  • Rules can be authored both externally and inline as a plain Java 8 code.
  • The engine allows rules to be authored as annotated Java sources, classes, or archives.
  • The library itself is a flexible tool for creating custom domain-specific rule languages (DSL).
  1. Intuitive and developer-friendly
  • Library's type system allows it to seamlessly process any kinds of objects, including JSON and XML.
  • Fluent builders, Java functional interfaces, and other best practices keep developers' code concise and clear.
  • Key components are exposed as Service Provider Interfaces and can be customized.
  1. Performance and security
  • The engine's algorithm and memory are optimized for large-scale and labeled data.
  • Built-in support of Java Security Manager protects against unwanted or potentially malicious code in the rules.

Project home

The official project description, documentation, and usage examples can be found at https://www.evrete.org

Prerequisites

Evrete is Java 8+ compatible and ships with zero dependencies.

Installation

Maven Central Repository, core module:

<dependency>
    <groupId>org.evrete</groupId>
    <artifactId>evrete-core</artifactId>
    <version>2.2.00</version>
</dependency>

Support for annotated rules (optional):

<dependency>
    <groupId>org.evrete</groupId>
    <artifactId>evrete-dsl-java</artifactId>
    <version>2.2.00</version>
</dependency>

Quick start

Below is a simple example of rule that removes from session memory every integer except prime numbers.

As inline Java code:

public class PrimeNumbersInline {
    public static void main(String[] args) {
        KnowledgeService service = new KnowledgeService();
        Knowledge knowledge = service
                .newKnowledge()
                .newRule("prime numbers")
                .forEach(
                        "$i1", Integer.class,
                        "$i2", Integer.class,
                        "$i3", Integer.class
                )
                .where("$i1 * $i2 == $i3")
                .execute(ctx -> ctx.deleteFact("$i3"));

        try (StatefulSession session = knowledge.newStatefulSession()) {
            // Inject candidates
            for (int i = 2; i <= 100; i++) {
                session.insert(i);
            }

            // Execute rules
            session.fire();

            // Print current memory state
            session.forEachFact((handle, o) -> System.out.println(o));
        }
        service.shutdown();
    }
}

As annotated Java source file:

public class PrimeNumbersDSLUrl {
    public static void main(String[] args) throws IOException {
        KnowledgeService service = new KnowledgeService();
        Knowledge knowledge = service
                .newKnowledge(
                        "JAVA-SOURCE",
                        new URL("https://www.evrete.org/examples/PrimeNumbersSource.java")
                );

        try (StatefulSession session = knowledge.newStatefulSession()) {
            // Inject candidates
            for (int i = 2; i <= 100; i++) {
                session.insert(i);
            }
            // Execute rules
            session.fire();
            // Printout current memory state
            session.forEachFact((handle, o) -> System.out.println(o));
        }
    }
}

where the rule itself is stored externally as PrimeNumbersSource.java

For further details see the official documentation

License

This project uses the following license: MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].