...
KFS provides an abstraction layer over Rice's parameter system to make it easier to use. This page will describe KFSFinancials' s parameter system and parameter naming conventions within KFSFinancials.
Anchor | ||||
---|---|---|---|---|
|
...
Within KFS, the use of the Parameter
has been restricted to KFS Financials core classes, and module code has been made agnostic of the Parameter
BO by using the ParameterService
.
...
- Parameter Detailed Type (KRNS_PARM_DTL_TYP_T): I.E. Component - Entities such as maintenance tables or transactional documents and batch steps. There are also general values that can be used when the parameter does not relate to a specific entity or batch step: Lookup, Inquiry, Document, Batch, and All.
- Namespace Code (primary key)
- Detailed Type Code (primary key)
- Detailed Type Name
- Active Indicator
Anchor | ||||
---|---|---|---|---|
|
...
Financials Parameter Conventions
There are three primary formats for a parameter's value:
- Indicator value: Y (true) or N (false).
- List of values: a list of values in a string delimited by semicolons (e.g. A;B123;C for A, B123, and C). Whether the list represents allowed or denied values is determined by the parameter's constraint code. Each element of the list is delimited with a semicolon.
- List of constraining/constrained value mappings: a semicolon delimited list of constraining/constrained value pairs. A constraining value maps to a list of constrained values, which are comma delimited. A constraining/constrained value pair represents all of the values associated with the constraining value. Whether the association refers to an allowed or denied relationship is based on the parameter's constraint code. For example, assume that the chart code DD may only be associated with the object codes 1111 and 2222. The constraining value is the chart code, and the constrained value is the object code. The pair would be "DD=1111,2222", and if the parameter constraint is A (allow), then this value would be interpreted as, "chart code DD (i.e. the constraining value) must have object codes 1111 or 2222 (i.e.the constrained values)". Multiple pairs may be delimited with semicolons. For example, a deny parameter with the value of "DD=1111,2222;EE=3333,4444" (note the semicolons and commas) can be interpreted as, "If the chart code is DD, then the object code cannot be 1111 or 2222. If the chart code is EE then the object code cannot be333 be 3333 or 4444.
In addition, there are two primary uses for a parameter in KFSFinancials:
- Parameters are used to provide configuration values. Examples include flags to turn on/off certain processing and email addresses to which to send notifications.
- Parameters are used to define valid/invalid values for validation purposes.
...
Info | ||
---|---|---|
| ||
There are various data validation mechanisms in Rice/KFSFinancials:
Data dictionary-based (see Document/business rules are full-fledged java classes that allow for very flexible validation rule logic. Rules have access to all Spring services, giving them a wide range of computational power. In fact, document/business rules use parameters to perform some of its validation. Parameters are ideal when functional specifications require that a value be in a list of allowed values (or not on a list of denied values). That is, parameters work extremely well for straightforward matching. However, institutions may desire to do the matching logic, but use a different list of values. Parameter-based validation allows them to change the list of values without revising code. |
...
Parameters in a compound parameter have the same namespace and detail type and have very similar names (see naming conventions).
Anchor | ||||
---|---|---|---|---|
|
...
Financials Parameter Service
The parameter table, KRNS_PARM_T, has fields that comprise its primary key: namespace, detail type/component, and parameter name. In KFSFinancials, most of the ParameterService
's methods take in a java.lang.class object and a parameter name to specify a parameter. The mapping mechanism is described in the next section. This section will deal primarily with how to use parameters with the parameter service.
...
getParameterValue(Class componentClass, String paramName)
: Returns the value is stored in the database for the parameter. This method does no parsing whatsoever of the parameter value and treats delimiter characters as regular text.getParameterValue(Class componentClass, String paramName, String constrainingValue)
: Returns the constrained value for the constraining value. For the KFS default implementation, if there are multiple constrained values for a constraining value (i.e. a comma in the list of constrained values for the constraining value), then the method will returnnull
. For example, if the parameter value were "AA=123;BB=222,333", then calling:-
getParameterValue(someClass, paramName, "AA")
returns "123" because AA is mapped to exactly one value -
getParameterValue(someClass, paramName, "BB")
returnsnull
because BB is mapped to two values (222 and33and 333) -
getParameterValue(someClass, paramName, "CC")
returnsnull
because CC is not mapped to any value
-
-
getParameterValues(Class componentClass, String paramName)
: Returns ajava.util.List
of the parameter's values, delimited using the semicolons in the value. For example:- If the parameter value is "A", then a list containing only "A" is returned.
- If the parameter value is "A;B;C", then a list containing only "A", "B", and "C" is returned.
- If the parameter value is AA=123;BB=222,333, then a list containing only "AA=123" and "BB=222,333" is returned (the comma delimiters are ignored).
-
getParameterValues(Class componentClass, String paramName, String constrainingValue)
: Returns ajava.util.List
of constrained values for the constraining value. For example: if the parameter value were "AA=123;BB=222,333", then calling:-
getParameterValuegetParameterValues(someClass, paramName, "AA")
returns a list with only "123" because AA is mapped to exactly one value -
getParameterValuegetParameterValues(someClass, paramName, "BB")
returns a list with only "222" and "333" because BB is mapped to two values -
getParameterValuegetParameterValues(someClass, paramName, "CC")
returns an empty list because "CC" is not mapped to anything
-
...
In the above sample, the first document.getClass()
represents the component class for the parameter. "VALID_DOCUMENTATION_LOCATIONS_BY_PAYMENT_REASON" and "INVALID_DOCUMENTATION_LOCATIONS_BY_PAYMENT_REASON" represent the allow and deny parameter of the compound parameter. "document.getDvPayeeDetail().getDisbVchrPaymentReasonCode()
" is the constraining value. "documentationLocationCode
" is the constrained value. If there's an error, the framework will highlight the "disbursementVoucherDocumentationLocationCode" attribute on the document, and uses the DD to help build the error text using the DD entry for document.getClass()
and the attribute name of "disbursementVoucherDocumentationLocationCode".
Anchor | ||||
---|---|---|---|---|
|
...
Financials Parameter Namespace and Component Resolution
This section will describe how the KFS Financials parameter service maps a class object to a namespace and detail type code. This will allow developers to determine which parameter is associated with a document, step, business object, etc and to determine what the primary key values of a new parameter should be.
...
Runtime parameter specification | Static parameter specification | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Anchor | ||||
---|---|---|---|---|
|
...
Financials Parameter Naming Conventions
The parameter names used within KFS Financials generally follow these conventions:
...