You can separate the rules from the process flow by many methods. At some level of abstraction, you invoke a “method” from different points in your business process. Then this question becomes one of the mechanisms by which this method can be changed without changing the business process itself.
You can pack the method into its own library (dll, jar or something else) and replace this jar with a new version. Change the library, change the business rules.
One could express the logic in the method in terms of configurable parameters obtained from the database. Modify the database, change the business rules.
If the complexity is too high, you will find that you have implemented your own rule engine.
At some point, it becomes more efficient to use the existing rule engine rather than reinvent the wheel.
For more detailed recommendations, you need to tell us more about what you are doing.
source share