Clone
 

luca molteni <volothamp@gmail.com> in Drools

[DROOL-5548] Model compiler cannot generate declaration from a function call (#3023)

* Reproducer

* Reproducer

* [DROOLS-5548] Model compiler cannot generate declaration from a function call

* test for [DROOLS-5549]

* Useless import

* Explode imports

* Support four arguments from clauses

* Map.of is not supported in java 8

[DROOLS-5536] Not pattern dereferencing a variable in a constraint is wrongly evaluated using the executable model (#3009)

* Reproducer

* Avoid indexing a double referencing pattern

* Remove useless declaration

* Avoid indexing when right scope is not a pattern

[DROOLS-5527] Exec model fails cast when using kie-dmn-validation rules (#3007)

* Reprocuer

* Fix

[DROOLS-5489] Support dmn-validation project with the executable model (#2980)

* Generate additional instanceofexpression

* Only add explicit instanceof when using this

* Revert

* Avoid using dollars in casts

* Support testExplicitCast

* Reproducer for mvel startsWithWithChar

* Better error message

* Allow startsWith with char

* Removed import

* endsWith

[DROOLS-5498] Avoid using import star in executable model classes and always use FQN (#2984)

* Avoid import star model

* Avoid import org.drools.core.util.*

* Avoid importing java.util.*

* avoid import java.time.format and java.time

* avoid import all java.text.*

* fixed missed GregorianCalendar

[DROOLS-5288] Execution default-generateModel ... failed: Scope expression for ... is not present! (#2963)

* Reproducer

* Reproducer

* OOPath is not a problem

* Renamed classes

* Even better reproducer

* Fix not needed scope

* testMapCheckForExistence another problem

* Alwyas use constant parsing in exec model

* inline cast projection

* Fix InlineCastProjection

* Better test

* testInlineCastProjection2

* Removed previous inline cast implementation, added unit test

* Extracted ToMethodCall in a separated class

* Extracted ToMethodCall in a separated class

* Refactor

* Support casting

* Better prepend

* Check before inlinecasting

* Added test

* Removed useless test

* Use explicit list type to avoid collision with List class names

* Reproducer for static function inside enums

* Fix failing test, removed useless check for enum

* New reproducer

* Another reproducer

* Move cast test to InlineCastTest

* Ignored two tests to be fixed in

https://issues.redhat.com/browse/DROOLS-5477

[DROOLS-5420] Change log level in KieRepositoryImpl.addKieModule to DEBUG (#2972)

[DROOLS-5275] Descope Traits (#2887)

* [DROOLS-5275] Descope Traits

New module for traits

Dependency on core

trait tests moved from drools core to traits

Split Trait logic in GenericTypeDefinition

Avoid using static method in DefaultFactHandle

Reverted DefaultBeanClassBuilder to master

DefualtBeanClassBuilder does not depend on traits

Moved trait test to LegacyTraitTest.java

Renamed TraitProxy, TraitProxyImpl extends TraitProxy

BaseTraitProxy file in service

Moved traits DRL to traits module

Fix Manual injection in MetadataTest

Injection of TraitPropertyWrapperBuilder

Moved TraitableBean to drools core

Moved TraitTypeMap and TraitableBean to core

Fix testTraitRedundancy

Descope trait OOP, with KieComponentFactoryInjected

Subclass DefaultFactHandle

Removed trait support for DisconnectedFactHandle.java (dead code)

TraitNamedEntryPoint

Moved trait persistence test to traits module

IsAEvaluatorDefinition has to be defined explictly

Removed TRAITSET_FIELD_NAME from listened properties as it wasn't covered by test

Create KnowledgePackageImpl using KieComponentFactory

Subclassed KnowledgePackageImpl to TraitKnowledgePackageImpl.java, removed TraitCoreService.java

removed traits from implicit imports

Fix specific case for JBPM in which the kbase is not present

* Updated TraitExample.java in drools-example to import trait dependency

* Added clarifying comment

* org.drools.traits.core.factmodel.traits

to

org.drools.traits.core.factmodel

* kie-util-test to test scope and jaxb to provided, retriggering

* Fix license

  1. … 358 more files in changeset.
[KOGITO-2276] wrong openapi schema for fields (#2922)

* Passing test

* Emit Jackson annotation used by OpenApi

Enabled default (#2919)

[DROOLS-5290] Executable model compiled throws exception in accumulate pattern matching (#2880)

* Reproducer

* Better test, only pattern

* Better test, only pattern

* Test run

* First refactor

* Refactor

* to stream API

* pattern stream API

* Last refactor

[DROOLS-5063] Supporting many test cases in typesafe DMN (#2863)

* Test on dates

Index support multiple types

Moved test

Support Date/Time/period

lower case fields

SonarCloud

Nullsafe model generation

Fix property accessor with spaces

Revert escaping in getting properties

Annotate getter with FEEL property name

* TO BE REVERTED: use type safe in every test

* fix test evaluation non type safe

* Reverted evaluation

* TO BE REVERTED 2: use typesafe in every test

* Wrong test creation

Superclass should have uppercase

Another test failing

Do not parametrize DMNTypeSafeTest

Support collection of basic fields

Do not run STRICT on every test

null check for fieldIsBasic

Two new regression tests

New regression test

feel:days and time duration is a Duration

Simpler should index

Do not compile if there's nothing to compile

Ignored test

* Disabled type safe logging

* Revert "TO BE REVERTED: use type safe in every test"

This reverts commit 64491632

* Revert "TO BE REVERTED: use type safe in every test"

This reverts commit 64491632

* Revert "TO BE REVERTED 2: use typesafe in every test"

This reverts commit f6936bd8

* Renamed typesafe test

* Parametrization of Typesafe DMN Test

* Reverted unchanged files

* Correct getProperty, setProperty generation

* DMNTypeSafeTest in typesafe package

* Reverted ValidatorImportTest

[DROOLS-5063] Experimenting with type safe DMN evaluation (#2850)

* Test

* Moved package

* Hardcoded solution

* First type generation

* WIP

* USe item definition

* Logger

* Fields

* AllFeelProperties

* Generate methods

* Compilation with templating

* Correct loading of class

* Full DMN test

* Generation of getter

* Correct naming

* First generation of InputSet

* Renamed

* Extracted common type

* All properties generation

* Override annotation

* Reformatted original DMN

* new tAddress type definition

* Test with Address

* Addresses

* XML annotations

* Moved TypedDMN to api to use it in kogito

* changed package

* Removed XML Annotation

* Use KieMemoryCompiler

* Do not hardcode packageName

* Renamed input set

* setAll > fromMap

* Dynamic test

* fromMap

* DMN13 is type safe

* Use namespace + modelname as package

* First class namespace index

* Extracted index

* Fix typesafe test

* Do not generate additional types

* Refactor use index class

* Read type to process only once

* Refactor index

* Avoid generating internal FEEL types

* Avoid creating Collection<Object>

* Generation skipping Object type

* Test running

* Do not escape strings while looking up in map

* Ignore enumerations

* Avoid escaped keys in allProperties

* Added type name to satisfy dependencies

* Typesafe DMNRuntimeTypesTest

* We don't need to have the type name

Revert "Added type name to satisfy dependencies"

This reverts commit 68eaeb1b

* Do no need type name

* Use base type rather than String/Object for enumeration

* Parametrized packageName

* Packagename with prefix

* Refactor

* Parametrize test based on test name

* Refactor FeelPropertyTemplate.java

* Refactor FeelPropertyTemplate.java

* Fix DMNRuntimeTypesTest

* Parametrized BaseVariantTest.java

* Parametrized tests typesafe/non typesafe

* Parametrized tests

* Added copyright

* Fix copyright

* comment on debug

* refactor

* Revert unused methods in BaseInterpretedVsCompiledTest.java

* Better usage of PackageName

* Overload to use the DMNModel

* Generate package with factory

* AbstractPropertyValueResult inner interface

* AbstractPropertyValueResult inner interface

* Test uses correct variant

* Copyright

* Sonarcloud

* Minor Refactor

* DMNTypeSafeTest is a BaseVariantTest

* Reverted removing of used code

* Only extends indexed types

* Removed debugging

* Removed debugging

* Removed useless public

  1. … 9 more files in changeset.
[DROOLS-5227] Refactor to merge DROOLS-5063 (#2853)

* reverted GeneratedClassDeclaration.java

* Applied method generation in GeneratedClassDeclaration.java

* All test passing

* Refactor

* Refactor

* Use stream

* Use stream v.2

* Refactor setter

* Final refactor of AccessibleMethod.java

* Really Final refactor

* All tests passing

* Always put extends types in generated class

* Moved implemented interfaces to static field

  1. … 3 more files in changeset.
[DROOLS-5206] Create a separated module for InMemory Compiler (#2832)

* New module

* New correct module

* Fix new Kie PMML

* Added test

* SonarCloud

* Copyright

* Invalid Class

* Some new tests

    • -0
    • +48
    /kie-memory-compiler/pom.xml
Create an empty CompositePackageDescr when there's only (#2820)

one PackageDescr

[DROOLS-5063] Refactor of POJO Generation on order to be used from other modules (#2812)

* Do not depend on ModelBuilderImpl

* Removed some dependency on the annotations

* Extracted interfaces

* Interface in separated class

* Removed other two classes

* Interface for type resolver

* added marker interface collection

* Do not depend on error

* New Type resolver

* java8

* Sonarlint

* Removed dependency with PatternDescr

* Removed map from TypeDefinition

* Sorted types are a list

* Compiling with Implemented types

* Correct generation of fields

* almost correct order

* Supertypes in BaseDescr

* Correct keyfields inherited

* Serial version field

* Ordered modifiers

* All tests passing

* Processed annotations

* Moved public API

* Moved API

* Use optional

* getSuperType is static

* Refactor

* First refactor of annotations

* Some annotations can be not added

* Fix position

* Fix testDeclaredSlidingWindowOnDeclaredType

* Process annotations only once

* Removed useless class

* Removed Useless class

* Renamed some leftover descrs

* Fix SmokeParserTest

* Fix testAnnotation name clash

* Try resolve annotation name from typeresolver

* Renamed to FieldDefinition

* do not add serial version UID

* Use correct anonymous class name

* Annotation test passing

* Refactor

* Fix CEP Esp test

* Disabble logging

* Removed javacomment

changed position algorithm

* License header

* License header 2

  1. … 10 more files in changeset.
[DROOLS-5113] Allow kie-benchmark Drools compilation benchmark to run with 10000 rules on Java 8 (#2795)

* RHDM-1266 separate externalses lambda in package

* Use package with first two number of the hash

* generated Enums should be public

* Revert "[DROOLS-5105] Default Lambda Externalisation Option to false (#2782) (#2787)"

This reverts commit 1be9e87e

* Revert "[DROOLS-5105] Default Lambda Externalisation Option to false (#2782) (#2787)"

This reverts commit 1be9e87e

* renamed to classHash

* Do not externalise

* Revert "Revert "[DROOLS-5105] Default Lambda Externalisation Option to false (#2782) (#2787)""

This reverts commit 692ffec7

Drools now supports Java 9 (#2789)

* Allow Drools to be used in Java9

* Unit test

* Rebase and fix Sonarcloud

[DROOLS-5043] Do not hash reverse support (#2761) (#2784)

* Do not hash reverse support

* Also remove from equals

(cherry picked from commit 0e730cb98100cb0994c8bfb93ec737225554a350)

[DROOLS-5105] Default Lambda Externalisation Option to false (#2782) (#2787)

* Default to false

* Externalise property in correct package

* Revert "Externalise property in correct package"

This reverts commit 7ce6c229

* Revert change of package

* Fix testConsequenceNoVariable

(cherry picked from commit 657f3050ba7a76ab78284d3d3fde2e05e845d888)

[DROOLS-5105] Default Lambda Externalisation Option to false (#2782)

* Default to false

* Externalise property in correct package

* Revert "Externalise property in correct package"

This reverts commit 7ce6c229

* Revert change of package

* Fix testConsequenceNoVariable

[DROOLS-5065] md5Hash results with line endings \r\n on MaterializedLambda tests on Windows (#2778)

* Use system line separator

* always use linux EOL

* update hashes with pretty printer

* Pretty print also expression hashes

[DROOLS-5023] executable model doesn't fire when Or with trimmed duplicate constraints (#2774)

* Test

* Remove white spaces in constrains

* Replacing white space in constraints is a very bad idea

* ExprId is generated after the parsing

* Refactor: Removed parameter from every method two tests failing

* Example on how to generate the expr id from the parsed expression

* UnificationTypedExpression separated from TypedExpression

* Original constraint used for unification purposes

* Generate expr Id in the end

* Removed packageModel

* Reverted logback-test.xml

[DROOLS-5043] Do not hash reverse support (#2761)

* Do not hash reverse support

* Also remove from equals

[RHDM-1237] Ensure all executable model classes are generated (#2763)

* Create an empty CompositePackageDescr when there's only one PackageDescr

* check for empty package map

[DROOLS-5007] Casting int interim varible to short causes compilation error in executable model (#2749)

* [DROOLS-5007] Casting int interim varible to short causes compilation error in executable model

* rewrite modify first

* Fix parsing of consequence with just one comment

* Do not fail on negative test

* Do not fail on negative test

[DROOLS-4990] NullPointerException with executable model using accumulate max with null Date field (#2748)

* Reproducer

* Fix Pattern DSL by setting correct scope

* Removed useless optional

* Flow DSL compilation

* Moved test in Pattern only class

* Removed useless import

* Do not execute OnlyPatternTest.java

Defaut to non-executable model (#2742)

[DROOLS-4092] Default to executable model in the kie-maven-plugin (#2636)

* buildAll() uses the executable model (pattern) now

* Fix org.drools.testcoverage.functional.oopath.OOPathCepTest.testOOPathNotAllowedInDeclaredWindow

* Fix overload to avoid default

* Fix compilation

* Do not cast null literal

* DROOLS-4902 Fix boolean coercion with primitive boolean

* Fix boolean typed coercion

* Avoid serialize DomainClassMetadata

* Revert "Avoid serialize DomainClassMetadata"

This reverts commit 9ae57e5b

Co-authored-by: Tibor Zimanyi <tibor.zimanyi@gmail.com>