# jruizgit/rules

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jruizgit-rules).**

1,293 stars · 215 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/jruizgit/rules
- awesome-repositories: https://awesome-repositories.com/repository/jruizgit-rules.md

## Topics

`business-rules` `durable-rules` `events` `node-javascript` `python` `rete` `ruby` `statechart`

## Description

This project is a business rules and complex event processing engine designed to manage logical decision-making and stateful workflows. It functions as a computational framework that evaluates incoming data streams and facts against conditional logic to derive new conclusions and trigger automated actions.

The engine distinguishes itself through a combination of forward-chaining inference and deterministic state machine orchestration. It uses salience-based conflict resolution to prioritize rule execution and supports persistent contextual state tracking to manage long-running business processes. By structuring logic into statecharts and flowcharts, the system ensures consistent transitions and behavior across complex application states.

Beyond its core inference capabilities, the framework provides tools for real-time event correlation, temporal scheduling, and batch aggregation to optimize high-volume data processing. It also includes utilities for non-blocking asynchronous task execution and high-speed string pattern matching to support diverse operational requirements.

## Tags

### Business & Productivity Software

- [Business Rule Engines](https://awesome-repositories.com/f/business-productivity-software/business-rule-engines.md) — Provides a high-performance inference engine for evaluating forward-chaining logic and complex state transitions.

### Artificial Intelligence & ML

- [Forward Chaining Engines](https://awesome-repositories.com/f/artificial-intelligence-ml/forward-chaining-engines.md) — Applies logical rules to incoming facts to derive new conclusions through iterative forward-chaining processing.

### Data & Databases

- [Complex Event Processing Engines](https://awesome-repositories.com/f/data-databases/complex-event-processing-engines.md) — Correlates event sequences and patterns to trigger automated actions based on logical and time-based constraints.
- [Real-Time Event Processing](https://awesome-repositories.com/f/data-databases/real-time-event-processing.md) — Evaluates incoming data streams against conditional rules to trigger actions in real time. ([source](https://github.com/jruizgit/rules/blob/master/docs/json/reference.md))
- [Batch Processing](https://awesome-repositories.com/f/data-databases/batch-processing.md) — Optimizes high-volume processing by grouping events and triggering actions only after reaching specific capacity thresholds. ([source](https://github.com/jruizgit/rules/blob/master/docs/py/reference.md))

### DevOps & Infrastructure

- [Business Process Orchestration](https://awesome-repositories.com/f/devops-infrastructure/distributed-task-orchestration/business-process-orchestration.md) — Orchestrates complex decision-making processes by structuring rules into deterministic flowcharts and statecharts.
- [Trigger-Based Event Correlation](https://awesome-repositories.com/f/devops-infrastructure/infrastructure-operations/infrastructure-event-correlation-tools/trigger-based-event-correlation.md) — Evaluates patterns across related events to derive insights from incoming data streams. ([source](https://github.com/jruizgit/rules/blob/master/docs/py/reference.md))

### Software Engineering & Architecture

- [Inference Rule Engines](https://awesome-repositories.com/f/software-engineering-architecture/inference-rule-engines.md) — Derives new conclusions and resolves rule conflicts by applying conditional logic to incoming data.
- [Salience-Based Conflict Resolutions](https://awesome-repositories.com/f/software-engineering-architecture/library-conflict-resolution/salience-based-conflict-resolutions.md) — Provides salience-based conflict resolution to prioritize rule execution within the inference engine. ([source](https://github.com/jruizgit/rules/blob/master/docs/py/reference.md))
- [State Machine Orchestrators](https://awesome-repositories.com/f/software-engineering-architecture/state-machine-orchestrators.md) — Structures complex logic into statecharts and flowcharts to manage deterministic transitions between application states. ([source](https://github.com/jruizgit/rules#readme))
- [Statechart Orchestration](https://awesome-repositories.com/f/software-engineering-architecture/statechart-orchestration.md) — Structures complex application logic as finite automata to manage state transitions and conditional flow control.
- [Event Aggregators](https://awesome-repositories.com/f/software-engineering-architecture/event-dispatchers/event-filtering-and-aggregation/event-aggregators.md) — Groups multiple matching events into single execution triggers based on thresholds to optimize high-volume processing.
- [Time-Based Event Scheduling](https://awesome-repositories.com/f/software-engineering-architecture/time-based-event-scheduling.md) — Triggers rules or actions based on elapsed time or event frequency using configurable timers.
- [State Persistence](https://awesome-repositories.com/f/software-engineering-architecture/workflow-persistence/state-persistence.md) — Maintains persistent contextual state across rule executions to track entity status and manage long-running business processes. ([source](https://github.com/jruizgit/rules/blob/testpy/manners.py))

### Development Tools & Productivity

- [Workflow Execution State Persisters](https://awesome-repositories.com/f/development-tools-productivity/database-session-management/session-state-persistence/execution-state-persistence/workflow-execution-state-persisters.md) — Maintains persistent data across rule executions to track entity progress and manage long-running business processes.
