v2.0

GoRules Version 2 is here - redesigned, now with managed cloud.GoRules Version 2 is here!

Watch the launch videoWatch
Java SDK

Java
rules engine.

Open source Java rules engine with native FFM bindings. Enterprise-grade decision tables and rule evaluation for Spring Boot and JVM apps.

Up and running
in three steps.

Install the SDK, load a decision graph, evaluate - the same JSON your team edits in the visual editor runs in your process.

Step 1

Add the Dependency

Add the GoRules engine to your Maven or Gradle project.

// Maven
<dependency>
    <groupId>io.gorules</groupId>
    <artifactId>zen-engine</artifactId>
    <version>2.0.0</version>
</dependency>

// Gradle
implementation 'io.gorules:zen-engine:2.0.0'
Step 2

Load a Decision

Create an engine and load your decision graph from a JSON file.

import io.gorules.zen_engine.JsonBuffer;
import io.gorules.zen_engine.ZenDecision;
import io.gorules.zen_engine.ZenEngine;
import java.nio.file.Files;
import java.nio.file.Path;

ZenEngine engine = new ZenEngine(null, null);
String content = Files.readString(Path.of("./decision.json"));
ZenDecision decision = engine.createDecision(new JsonBuffer(content));
Step 3

Evaluate Rules

Pass your input data and receive the decision result.

var context = new JsonBuffer("""
    {
      "customer": { "tier": "premium", "country": "US" },
      "cart": { "total": 150, "items": 3 }
    }
    """);

var result = decision.evaluate(context, null).get();
System.out.println(result.result());
// {"discount":15,"freeShipping":true}

Why
Java?

Built for performance and developer experience - native speed with an API that feels at home in your codebase.

Modern FFM Bindings

Native bindings through Java's Foreign Function & Memory API (JDK 22+). No JNI or JNA overhead.

Framework Friendly

Plain Java API that drops into Spring Boot, Quarkus, or any JVM service without extra setup.

Thread Safe

Fully thread-safe engine designed for concurrent JVM applications. Share one engine across threads.

About the Java SDK

GoRules delivers a production-ready business rules engine for Java applications. The SDK provides native bindings through Java's Foreign Function & Memory API (FFM), connecting your Java code directly to our high-performance Rust core while maintaining the familiar Java development experience.

Designed for enterprise workloads, the engine integrates seamlessly with Spring Boot, Quarkus, and other popular Java frameworks. Whether you're building microservices, batch processing systems, or traditional enterprise applications, GoRules handles complex decision logic with consistent sub-millisecond performance.

The SDK supports all GoRules features including decision tables, expressions, and complex rule graphs. Decision definitions created in the visual editor work directly with the Java SDK, enabling business users to modify rules without requiring code deployments or developer intervention.

See the public Zen Engine benchmarks

Build with Java.
Govern with GoRules.

The engine is open source and free forever - add the GoRules BRMS when your team needs versioning, approvals, and an audit trail.