Business Rules
Business rules are units of business logic that are stored as objects in System Setup. Business rules are used for many different purposes in STEP and come in three variants:
|
Input |
Output |
Side effects allowed |
---|---|---|---|
Business actions |
Current object, current event batch, etc. provided by the context in which the action is executed. For more on business actions, refer to the Business Actions topic. |
None |
Yes |
Business conditions |
Current object, current event, etc. provided by the context in which the condition is evaluated. For more on business conditions, refer to the Business Conditions topic. |
Boolean result of evaluating the condition and a message for the user |
No |
Business functions |
Input parameters defined by the function and provided by the functionality evaluating the function. For more on business functions, refer to the Business Functions topic. |
Result of evaluating the function |
No |
A fourth type of business rule, business library, allows users to define JavaScript library functions that can be called from other JavaScript-based business rules. For more information on business libraries, refer to Business Libraries topic documentation.
For more information on differentiating between scenarios where one business rule is more useful than another, refer to the Business Rule Use Cases topic in the Business Rules documentation.
Setup Requirements
The following set up is required to use business rules:
-
Perform the one-time setup steps described in Initial Set Up for Business Rules.
-
Create a business rule as described in Creating a Business Rule, Function, or Library.
-
Edit the business rule as described in the Editing a Business Rule or Function.
-
Test the business rule as described in Testing a Business Rule.
Additional Information
The following information is useful prior to creating and after a business rule is set up:
-
Review the most common ways to use business rules as described in Using Business Rules in STEP.
-
Review the decisions that affect how a business rule runs as described in Running a Business Rule.
-
Maintain or modify global business rules as described in Maintaining a Global Business Rule.
-
To understand more about the business functions and how to use them, refer to Calling a Business Function from a JavaScript Business Rule.
-
Delete a business rule as described in Deleting a Business Rule, Function, or Library.
-
Maintain or modify local business rules as described in Business Rules and Workflows in the Workflows documentation.
-
Understand the differences between global and local business rules as described in Global and Local Business Rules.
-
Export a business rule definition as comments and submit to an external source control system for comparison purposes as described in Configuration Management documentation.
-
JavaScript-based business rules can be created, maintained, and (unit) tested outside STEP as described in the VCSI: Editable Business Rules Format topic in the Configuration Management documentation.