Business Logic Templates are a simple way of storing a calculation method for a Metric. They are a full business logic component and are a handy way of creating a baseline for other business logic components. New business logic components created from a template copy the code and create a new instance of it. However, in general, flexibility when using templates is quite low, and Business Logic Modules should be used wherever possible.
Business Logic modules are independent code components that enable re-use of the same code base by other Business Logic. Modules can also include other Modules, so the hierarchy levels can be multiple. When using Modules, the code is contained in one place and is re-used by each of the other components which link to it. This re-use of code sections eases the maintenance by eliminating code duplication and making it possible to apply system-wide logic changes quickly and easily.
During the design stage, it is necessary to identify the main Business Logic modules and their related parameters. Once the contract modeling is completed and the Contract Manager has a clear view of the logic to be used, it becomes possible to identify the calculations they have in common and that can be defined in separate Modules.

The above diagram depicts a Module that calculates the success rate of helpdesk activity to meet a target within given thresholds. To implement it as described, it is necessary to define two parameters, known as Metric Parameters: one that defines the type of helpdesk activity, and another for the threshold to compare against (see definition of Metric Parameter in Cases to be Considered During the Modeling Process).
By careful consideration of the types of calculations implemented in the system, you will probably find that a number of similar types may be performed by changing one small section of code, and using a parameter to act as the 'switch' between them. In this way, you can minimize the amount of code you need to create, and maximize the amount of code re-use.
|
Copyright © 2012 CA.
All rights reserved.
|
|