

Implementation Guide › Implementation › Business Logic Scripting (Business Logic Expert) › Business Logic Modules
Business Logic Modules
There are a number of important considerations when building modules for business logic, especially if you are using multiple modules within a single Metric:
- To ensure the use of a module is clear, you should add a comment at the top of the Business Logic for that Metric.
- If you are using a small piece of code within the Metric's business logic space, and including one of more modules in the code, you should ensure that for any default event handlers or subroutines, you remove that section of code from the main Metric business logic. You must make sure that each subroutine and event handler is only defined once in each of the modules being used by a particular Metric. This is to avoid confusing the calculation engine and producing unexpected results.
Note: If, for example, you define the OnPeriodStart() function in your module and put specific code in it, and then leave the default OnPeriodStart() with no code in your Metric's main business logic screen, then at runtime the engine does not know which subroutine to execute. It may not execute the code that you are intending it to execute.
- You need to be extremely careful if you are parameterizing the OnRegistration subroutine. In some cases, doing so can break the automatic trigger built within the system to recalculate Metrics based on the addition of new raw data.
Copyright © 2013 CA.
All rights reserved.
 
|
|