frtb-starter/src/main/java/com/activeviam/frtb/starter/signoff/adjustments/ directory.
Configure Adjustment Execution
All adjustment processes are defined within theAdjustmentExecutionConfig.java class. Other library classes are mentioned where relevant.
Fact-level adjustments
Fact-level adjustments are modifications of the underlying data held in the datastore. They operate directly on datastore rows, usingExecution objects containing functional
components.
These functional components are defined in the ExecutionFunctionalComponents.java class.
The Execution object
Add On Execution
appliesOnAdjustmentsisfalsesourceTaggercontains:userInputSourceTagging()- tags the row as direct user input
stepscontains:doubleInputReplacer()- replaces the initial value with the request input value
Scaling Execution
appliesOnAdjustmentsistruesourceTaggercontains:inverseTagging()- tags a row as the inversion of the initial rowscaleTagging()- tags the row as a scaling of the initial row
stepscontains:doubleInverter()- the execution replaces the initial value with its inverse (initialValue * -1.0)doubleScaler()- the execution replaces the initial value with the scaled value (initialValue * scalingFactor)
Override Execution
appliesOnAdjustmentsistruesourceTaggercontains:inverseTagging()- tags a row as the inversion of the initial rowuserInputSourceTagging()- tags the row as direct user input
stepscontains:doubleInverter()- the execution replaces the initial value with its inverse (initialValue * -1.0)doubleInputReplacer()- replaces the initial value with the request input value
Roll-over adjustments
Roll-over adjustments operate on the datastore, replacing the rows corresponding to the current as-of date with the approved rows from the input as-of date. The executors use therollOver() method with the following arguments:
For the PnL roll-over adjustment, the
inverters are as follows:
inPlaceDoubleOrArrayInverter() function returns input * 1.0 for double inputs and ((IVector) input).scale(-1.0) for IVector inputs.
Include Defined Executions in Executors Map
Now that we have defined our adjustment executions we need to add them to our executorsMap which will be accessed by the services defined in the Sign-off API library.
We want to include our executors in the bean with the qualifier SP_QUALIFIER__EXECUTORS
Note that our executors are included in both profiles.
Define required dimensions for sign-off adjustments
Navigate toPLSignOffAnalysisConfig.java
We add SignOff Source Dimension to the appropriate cube in this case PLCube.
Add source tagging fields
This will add extra fields to describe the adjustments and handle the sign-off. Navigate toPLSignOffAnalysisConfig.java
Define the sign-off task store
This store will hold the sign-off task for the sign-off task hierarchy and task filtering. This store is defined from the base cube store and the required levels to filter on. The specific Datastore Schema Description Post-Processor will introspect the cube description and create the sign-off store compatible with the required level. Navigate toPLSignOffAnalysisConfig.java
Define supported Adjustment
Navigate toSupportedAdjustmentsConfig
Define a SupportedAdjustmentDTO bean.