Business Rules Recommended Practices
This document describes the recommended guidelines for writing business rules. The recommendations are compiled from other Stibo Systems documents and experiences from the Stibo Systems Professional Services team.
Considerations
- Writing complex business rules is best done by a software developer.
- Business rules can be maintained without involving Stibo Systems.
- Business rules provide a way to extend the behavior of your system, however, these rules may have a big impact on functionality and performance.
- Business rules can be used in imports, approval processes, workflows, Web UI screens, etc. and provide a flexible way to tailor the core functionality in a very precise manner.
- The alternative to business rules are extensions, either as written using the extension API or custom extensions developed by Stibo Systems. The advantages of extensions include their ability to run faster, as they do not have to be compiled at run-time and that they can be developed using a Java IDE, which offers code completion and syntax checking while writing the code. Extensions should be considered for complex solutions.
Recommendations
When developing business rules:
- The system supports these types of business rules: business conditions, business actions, and business functions, as well as business rule libraries, which are a collection of JavaScript methods. For more information, refer to the Business Rules topic.
- The core concept to improving business rules is to write clear, well-documented code. Refer to the Writing Clear Business Rules topic for suggested considerations.
- Business libraries are useful elements for reusing JavaScript code and across business rules. However, business libraries can cause performance issues, and in these cases, business functions may be more useful. Refer to the Using Business Libraries topic.
- Should issues arise through using business rules, a good logging regimen as well as proper exception handling is critical. Refer to the Logging and Exception Handling topic. For a deep exploration of exception handling, refer to the Error Handling Recommended Practices topic in the Resource Materials online help documentation.
- Relying on business rules is critical for many types of use cases, but business rules can impact performance if they are not maintained properly. Refer to the Performance Considerations topic for some practices to ensure that business rules are not hindering the system.
- To export, maintain, and test business rules, refer to the Working with Business Rules Externally topic.
- The Appendix for Recommended Practices for Business Rules contains tricks and code examples that can help you write business rules.