How to Add New Outputs to Header
The Agreement Accelerator follows the usual rules when it comes to output generation – that is that each output requires its own element to be present.
To create a new output, create a new element and put it after the ___CUSTOM_OUTPUTS___
separator element and before ___WARNING_HANDLING___
separator in the AGR_FormulaBasedPricingHeader line item logic.
The element should contain the call: cProcessor.addOrUpdateOutput("ROOT", parameter)
, which appends the output defined by the “parameter” variable to the list of existing outputs. The parameter is a Map of defined structure:
resultName
- The name of the result. Defines the key in the outputs Map.resultLabel
- The label of the result, to be displayed for the user.resultType
- The type of the result, other types are defined under CalculationResultType enumerator.result
- The value of the result, has to be valid according to the defined resultType.
Remember that if you want to utilize the result of this output in Condition Record, it’s recommended to append its value into the appropriate attribute structure in the Condition Records element of Line Item logic. See the How to Modify What Is Saved in Condition Records article for more details.