Literal Expression Simulaton Example
The Business Knowledge Model (BKM) described in this section is available from the Model Wizard ( ). In the Perspectives select the Requirements | Decision Modeling.
- Create the pattern for 'DMN Business Knowledge Model | Business Knowledge Model Literal Expression'
- Navigate in the Browser window to 'Business Knowledge Model Literal Expression | Payment'
Double-click on the 'Payment' element to open the BKM in the DMN Expression window
Similar to Decision table, the Business Knowledge Model implemented as a Boxed Expression can be tested as well.
Take this 'Payment_2_decimal' BKM as an example:
This BKM will calculate the monthly repayment based on interest rate, number of terms and principal amount.
We could provide test values such as these:
Click on the Simulation button on the tool bar; this result is obtained:
The runtime parameter and return value will be displayed with an equals sign '=', followed by the runtime value.
In this example, given an annual Rate of 4% for 30 years and a principal of $300,000, the monthly repayment is $1,432.25
Note: The DMN Library already has a PMT function defined; this example mainly demonstrates how Literal Expression works and how to test it with a set of arguments.