[jboss-jira] [JBoss JIRA] (DROOLS-5324) Refactor "if" driven compilation for dmn/pmml

Gabriele Cardosi (Jira) issues at jboss.org
Tue May 12 10:29:35 EDT 2020


     [ https://issues.redhat.com/browse/DROOLS-5324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gabriele Cardosi updated DROOLS-5324:
-------------------------------------
    Description: 
Inside

{code:java}
 CanonicalKieModule.createKieBase( KieBaseModelImpl, KieProject, ResultsImpl, KieBaseConfiguration)
{code}
there is a call to

{code:java}
 CanonicalKieModule.hasNonModelResources( KieBaseModelImpl, KieProject )
{code}

This method returns `true` if there are some dmn and/or pmml files in the project.
If such boolean is `true` a new KnowledgePackagesBuildResult is created.
The main issues with this approach are:
1) managing of dmn/pmml resources is completely hidden inside this boolean method and hard to find in debug
2) it is possible that the new KnowledgePackagesBuildResult build will fire a compilation also of "drl" or other resources that are "compiled" anyway even without this flag


  was:
Inside
 `CanonicalKieModule.createKieBase( KieBaseModelImpl, KieProject, ResultsImpl, KieBaseConfiguration)` there is a call to

 `CanonicalKieModule.hasNonModelResources( KieBaseModelImpl, KieProject )`
This method returns `true` if there are some dmn and/or pmml files in the project.
If such boolean is `true` a new KnowledgePackagesBuildResult is created.
The main issues with this approach are:
1) managing of dmn/pmml resources is completely hidden inside this boolean method and hard to find in debug
2) it is possible that the new KnowledgePackagesBuildResult build will fire a compilation also of "drl" or other resources that are "compiled" anyway even without this flag




> Refactor "if" driven compilation for dmn/pmml
> ---------------------------------------------
>
>                 Key: DROOLS-5324
>                 URL: https://issues.redhat.com/browse/DROOLS-5324
>             Project: Drools
>          Issue Type: Task
>            Reporter: Gabriele Cardosi
>            Assignee: Mario Fusco
>            Priority: Major
>
> Inside
> {code:java}
>  CanonicalKieModule.createKieBase( KieBaseModelImpl, KieProject, ResultsImpl, KieBaseConfiguration)
> {code}
> there is a call to
> {code:java}
>  CanonicalKieModule.hasNonModelResources( KieBaseModelImpl, KieProject )
> {code}
> This method returns `true` if there are some dmn and/or pmml files in the project.
> If such boolean is `true` a new KnowledgePackagesBuildResult is created.
> The main issues with this approach are:
> 1) managing of dmn/pmml resources is completely hidden inside this boolean method and hard to find in debug
> 2) it is possible that the new KnowledgePackagesBuildResult build will fire a compilation also of "drl" or other resources that are "compiled" anyway even without this flag



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list