Red Hat Bugzilla – Bug 1261834
Improve separation of KieModules used by "asset validation" and "project" build
Last modified: 2016-01-08 17:13:43 EST
Description of problem:
Business Central uses different instances of KieBuilder and related KieFileSystem to build KieModules for the *same* ReleaseId during "asset validation" and "project build". The separation is to support validation of (DRL) assets by KieBuilder before the User commits changes made during authoring to the main "project" KieBuilder instance.
This leads to problems when "validation" has occurred *after* a Project build as KieServices.newKieContainer(ReleaseId) resolves the KieModule from KieRepository, which in the above scenario means it is the *transient* KieModule used for validation and may lack many "project" assets.
A temporary workaround was put into 6.3.x (Community) to prevent the lookup of a KieModule from KieRepository during "project" build, but after discussion with mfusco it is considered a temporary solution.
Ideally the KieBuilder used for "asset validation" should use a transient ReleaseId (i.e. manipulate the pom.xml to have a different G, A or V, e.g. append -<userId>-<sessionId> etc and remove the transient KieModule from KieRepository after validation has been performed.
Version-Release number of selected component (if applicable):