Advanced Customization > Business Logic Customization > Customizations in Type and Attribute Management > Using a BusinessAlgorithm in a Calculated Attribute > Solution
  
Solution
Implement a custom BusinessAlgorithm and execute it with a calculated attribute.
Prerequisite Knowledge
To achieve this result, you need to have an understanding of the following:
Calculated Attributes — Attribute Customization
Solution Elements
Element
Type
Description
BusinessObject
Java Interface
This class provides the public APIs to create, retrieve, and modify an instance of business object.
Descriptor information should be retrieved from the BusinessField.
BusinessObjectHelper
Java Class
This class provides the public APIs to create, retrieve and modify business objects in bulk.
This supports working with heterogeneous types of business objects.
BusinessAlgorithmContext
Java Interface
This class provides the public API for accessing BusinessObjects that are stored in the MethodContext and is used to pass them and the Locale into the calculation engine. It provides a cache that custom BusinessAlgorithms can use to store state between executions, and it provides an index into the list of BusinessObjects to indicate which is currently being evaluated against.
BusinessAlgorithm
Java Interface
This interface is implemented by application developers and customers who want to define new calculated attribute operations. These operations may involve complex or expensive business logic. Classes Implementing this interface must be public and must provide a public no argument constructor.
execute()
Calculated Attribute Function
The new function for use in calculated attributes which create an instance of a BusinessAlgorithm, invoke its execute function, pass the arguments specified in the Type and Attribute Management utility, and return its results to the calculated attribute layer to be used by further formula processing.