Expression: accumulate ( $sys_event3 : DiagnosticEvent ( ( elements contains 694 && ( startDate >= months12BeforeRunDate && startDate <= runDate ) && claim == true ) , $sys_roundedStart2 : contiguousDays.start ) ; $sys_maxStartDate4 : maxDate ($sys_roundedStart2) , $sys_minStartDate5 : minDate ($sys_roundedStart2) , $sys_eventSet6 : collectSet ($sys_event3) ;$sys_eventSet6.size >= 2, CommonGlobalFunctions.getDateGap( $sys_minStartDate5, $sys_maxStartDate4, DateTimeUnit.DAY ) > 7)
Error: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.kie:kie-maven-plugin:8.39.0.Final:build (default-build) on project xyz: Execution default-build of goal org.kie:kie-maven-plugin:8.39.0.Final:build failed: The method getDateGap(Date, Date, DateTimeUnit) in the type CommonGlobalFunctions is not applicable for the arguments (Date, Object, DateTimeUnit)
We are using custom build maxDate and minDate to calculate the max and min date.
Have tried to rewrite the rule with multiple ways suggested by drools documentation, but none of them getting through rules compiler.
Could you please if we missing anything, strange behavior I observed whichever is assigned first either min or maxdate ,they are being considered as normal object rather than date