Business Rule Analysis

This is one of the recommendations for performing analysis on business rule to improve performance. The full list is defined in the Business Rule Analysis topic here.

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, see the Business Actions topic here.

None

Yes

Business conditions

Current object, current event, etc. provided by the context in which the condition is evaluated. For more on business conditions, see the Business Conditions topic here.

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, see the Business Functions topic here.

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, see Business Libraries topic documentation here.

For more information on differentiating between scenarios where one business rule is more useful than another, see the Business Rule Use Cases topic in the Business Rules documentation here.

Using Business Rules in STEP

Wherever business rules are used within STEP, they are always tested or executed in relation to one object at a time, and in a specific context / workspace. The most common places to use business rules are included in the list below.

For more information, see Business Rules on Approval documentation here.

For more information, see Using Automatic Classification with Business Actions documentation here.

For more information, see Run Business Rule Operation documentation here.

For more information, see Business Rules with Conditional Attributes documentation here.

For more information, see Business Conditions in Data Profiling documentation here.

For more information, see Execute Business Action Processing Plugin Parameters and Triggers documentation here or Execute Business Action for Event Batch Processing Plugin Parameters and Triggers documentation here.

For more information, see the Gateway Integration Endpoint Bind documentation in the Resource Materials online help here. Gateway Integration Endpoints (GIEPs) will not always use the REST plugin; The Gateway Integration Endpoint Bind topic only applies for GIEPs that use the REST plugin.

For more information, see Business Rules in an Import Configuration documentation here.

For more information, see Matching, Linking, and Merging JavaScript Binds documentation or Golden Records Survivorship Rules documentation.

For more information, see OIEP - Event-Based - Event Triggering Definitions Tab documentation (here) or OIEP - Pre-Processor - Business Action documentation (here).

For more information, see Business Conditions in Web UI documentation here.

For more information, see Business Rules in Workflows documentation here.

Test & Time Business Rule

Use the 'Test & Time Business Rule' dialog, as defined in the Testing a Business Rule topic of the Business Rules documentation here. This option gives a first indication of the performance of the business rule for a certain item.

Test a business rule multiple times against objects that will either fail or pass and analyze the performance timing.

Test a long-running business rule to verify the performance timing.

For example, the business rule shown below took about 0.98 milliseconds to complete for the selected object. The same business rule may take more or less time for other objects.

Business Rules Statistics

Use the business rule 'Statistics' tab, as defined in the Maintaining a Global Business Rule topic of the Business Rules documentation here. This tab shows the performance of the business rule over time.

The minimum, maximum, average, and total duration of the business rule, as well as the number of invocations per selected period are displayed. The period can be configured to be between an hour up to a week.

For example, the image below shows the same business rule was invoked more than 100 times during the last 7 days. That average duration was about 138 ms. Click on the maximum duration of about 2092 milliseconds to show which item the business rule took longest to execute.

Admin Portal Business Rule Activity Dashboard

Use the Admin Portal 'Activity Dashboards' tab to display business rules information, as defined in the Activity Dashboards topic of the Administration Portal documentation here. This option allows you to track and trace the most demanding business rules performance over a given period.

The dashboard shows the top business rules over the configured period, with the longest average evaluation time, the longest maximum evaluation time, the longest total time, and the number of invocations.

Start with the 'Total time' section to review the business rules with the longest average evaluation time and the most number of invocations.

Admin Portal Business Rule Tracing

Use the Admin Portal 'Tools' tab to run the Business Rule Tracing functionality. When enabled, business rule tracing writes to log files.

Important: Enabling business rule tracing has a negative impact on performance. To minimize the impact, leave it enabled for a limited time and add as many tracing configuration filters as possible.

Define the location of the tracing log files by setting the case-sensitive property Log.BusinessRuleTraceRoot in the sharedconfig.properties file.

To enable business rule tracing, click the yellow information icon next to each parameter for a description of the parameter / filter. Supply the relevant information and click the Activate button. Then within the 'Trace Duration' time frame, from workbench, trigger the business rule(s) being traced.

Tracing stops when the system is stopped or restarted, and when the Trace Duration expires. Once a trace is activated a stop button () is displayed, which allows a user to manually stop tracing.