Typically, after creating any business rule, it is important to test that it performs as expected.
For an overview of the decision points involved in running a business rule, see the chart in the Running a Business Rule topic here.
Important: Business rules using context-specific JavaScript binds cannot be tested using this method. Therefore, JavaScript that uses the import change info or approve context binds cannot be tested. Similarly, business actions where the Execute JavaScript function is used to create parametrized business rules cannot be tested.
Using the BusinessRule.Warning.Threshold configuration property in the sharedconfig.properties file, allows you to specify a threshold in milliseconds for business action execution. If it takes longer to execute or test a given business action, a warning is posted in the main STEP log file available from the STEP System Administrator button on the WebStart. For information on the log, see the Logs topic in the Administration Portal documentation here.
Choose one of the following ways to display the Test & Time Business Rule dialog:
Click the Test JavaScript button to test modifications made to the JavaScript. If the modifications should be retained, click Save. If the modifications should be rolled back, click Cancel.
The Test & Time Business Rule dialog includes standard parameters for actions, conditions, and functions. In addition to the standard parameters, testing action business rules includes the 'Rollback changes after test' parameter.
In addition to the standard parameters, testing function business rules includes a Parameters section that shows each of the input parameters defined in the business function.
After displaying the dialog, supply the following information to test a business rule.
) to display the Select Test Object dialog. Use the Browse or Search tab to identify and select the object used to test the business rule. Note: The selected object must be of an object type that is valid for the business rule.
) to display the appropriate selection dialog required for the Input Parameters available in the function. Use the Browse or Search tab to identify and select each input object for testing. The following parameter values are supplied when the test is complete.
Testing Outcome Examples
Testing the following business condition includes the outcome of the condition and the localized message in the Result parameter. A Logger message is displayed in the Log parameter.
The following business rule has a problem in the JavaScript code as indicated by the row number in the error details parameter.
2018, Stibo Systems – Confidential