Applying AI to Workflow and Business Rule Engines

Applying AI to Workflow and Business Rule Engines

I’ve been building workflow engines (WFEs) and business rule engines (BREs) for years, and I keep coming back to them.

The beauty of these tools is in their ability to solve a problem once and then keep solving it, over and over, as part of something bigger.

Whether we call it "no code," "low code," or just code, the goal doesn’t change —create small, reliable pieces that can be combined into more complex systems. This principle works in nature, in manufacturing, and in software. The challenge is always in figuring out the details.

The Struggle with Abstractions

Abstractions are where things get tricky. It’s one thing to say, "Break the problem into smaller parts," and another to decide:

  • How small should a part be? Too small, and you get a fragile system. Too big, and flexibility disappears.
  • Where do you draw the lines? Poorly drawn boundaries lead to "leaky abstractions," where components don’t hide their inner workings and start causing unexpected problems.
  • When is a part done? It’s tempting to keep tweaking, but at some point, you need to move on.

We’ve all seen what happens when abstractions fail. Imagine a car with parts that don’t fit together seamlessly or a factory where the machines don’t align. Software is no different.

Building Blocks and the “Genius of the AND”

Object-oriented programming (OOP) gives us solid guidelines for managing these complexities. I’ve leaned on the SOLID principles for years to define components that are just the right size and have clear boundaries. But good engineering is about more than rules. It’s about embracing what’s deterministic and what’s adaptable, structured and flexible.

This is where large language models (LLMs) come in. LLMs aren’t like traditional software—they’re probabilistic, generating outputs based on patterns in data. At first glance, they might seem like a mismatch for the strict logic of WFEs and BREs. But they’re not. Instead, they’re an opportunity to combine deterministic systems with AI’s adaptive capabilities.

Combining the Old and the New

By blending WFEs and BREs with AI, we can build smarter, more dynamic systems. Here’s how:

  • Smarter Workflows: AI can analyze workflow data in real-time and suggest optimizations or adjustments. Think of it as adding intuition to a structured system.
  • Better Rule Engines: AI can enhance rule engines by predicting outcomes or adjusting rules based on context, making them more responsive without losing structure.
  • Handling Uncertainty: Where traditional systems struggle with ambiguity, AI thrives. Combining the two lets us build systems that handle the known and the unknown.

The key is to balance deterministic workflows with AI’s stochastic nature. This doesn’t mean throwing out what works. It means building on it, extending what we already know to handle new challenges.

Where We Go From Here

The combination of WFEs, BREs, and AI isn’t just a technical challenge—it’s a design challenge. It forces us to rethink how we define abstractions and boundaries, not to replace them but to extend them.

The genius isn’t in choosing between traditional systems or AI. It’s in using both together, leveraging what each does best. Deterministic systems bring clarity and reliability. AI brings adaptability and insight. Together, they can create systems that are not just functional but transformative.

We don’t have to reinvent the wheel to move forward. We just have to build smarter machines—and let them work together.