Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-7613

Issue with Accumulate expression after migration to Drools 8.39.0.Final (executable model) from version 6.5.0.Final

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • None
    • executable model
    • None
    • Hide

      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

      Show
      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
    • As part of the Apache migration we're using this project https://github.com/apache/incubator-kie-issues/issues as an issue tracker. Please port this request there
    • NEW
    • NEW
    • ---
    • ---

      Facing an issue with Accumulate expression after migration to Drools 8.39.0.Final (executable model) from version 6.5.0.Final.

              lmolteni@redhat.com Luca Molteni
              chigurupatig@aetna.com Gopi Chigurupati (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: