Hacker News new | ask | show | jobs
by adamkl 2102 days ago
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.

2 comments

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.