I am using Business Central version 7.40.0. When calling static Java method std
from Drools Business Central DMN project/model, I'm getting following error:
DMN: Error compiling Java function 'stdev' on node 'stdev': Error resolving external function as defined by: function(val) external { java: { class: ""com.sample.StandardDeviation"", method signature: ""std(java.lang.Number)"" }}...
Error compiling the referenced FEEL expression
I have:
- Created Maven jar with static Java method
package com.sample;
import java.math.BigDecimal;
public class StandardDeviation {
public static BigDecimal std(Number val) {
return new BigDecimal(val.doubleValue() * 2);
}
}
In my DMN model, I am calling static Java method inside 'stdev' BKM (business knowledge model) element. BKM with class and method signature
- class:
"com.sample.StandardDeviation"
- method signature:
"std(java.lang.Number)"
- class:
Saving BKM/DMN or building the model gives above error
What could be the issue? Am I doing anything incorrectly? How to check the logs in Drools Business Central?