Hacker News new | ask | show | jobs
by capableweb 2102 days ago
Best video to see how this rules engine work would be to watch the following video: https://www.youtube.com/watch?v=6_mDiH5_hSc

Zach shows how a simple RPG game is implemented with play-cljc and odoyle-rules

1 comments

Thanks for sharing, I’m ashamed to admit that I never really “got” these rule engines, but seeing this example finally made things click for me.

Am I correct that there’s a very large overlap between rule engines and workflow engines, and one could use a rule engine like this to implement workflows?

I have been playing with the idea that a rule engine would work well with a state machine.

State machine manages the workflow, rule engine determines which transitions to execute?

Maybe that is overkill, but I've been trying to build a model in my head on how to model complex business processes.

Have you looked into something like BPMN + DMN? BPMN provides workflow modeling and basic decisions, and DMN provides decision tables which can implement more complex rules. There are a couple frameworks which can work on top of that to provide a system implementation.
Exactly this is what I was thinking. We currently have a workflow engine that is event driven + a projection (think: CQRS), and it’s fairly unwieldy. Most specifically, the business logic is defined all over the place, and I was wondering whether a rule engine would make it easier to define the constraints and business logic to act upon these events.