Search code examples
recommendation-enginerule-engineworkflow-engine

Rules engine VS Workflow engine


I want to know what is the difference between a rule engine and a workflow engine. In my case, I have to automate some rules of a ticketing system. In fact, each ticket has a workflow (Open -> In progress -> resolved -> Closed).


Solution

  • The rule engine produces a set of outcomes (commands, facts, etc) based on known facts and rules. You can think about it as a stateless function. Multiple implementations can cache state for performance, but this is purely for optimization purposes.

    The workflow engine is about state management, and reliability in taking actions.

    In the applications I helped to design a rule engine is usually an activity in a workflow. For example the ticket workflow can invoke the rule engine activity to decide if it is OK to move to the next state given current ticket state.

    Obviously you can create a system that mixes both more closely, but conceptually they still play different roles.