Bug 1261834

Summary: Improve separation of KieModules used by "asset validation" and "project" build
Product: [Retired] JBoss BRMS Platform 6 Reporter: manstis
Component: Business CentralAssignee: manstis
Status: CLOSED EOL QA Contact: Jiri Locker <jlocker>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.1.0CC: kverlaen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:10:00 UTC Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description manstis 2015-09-10 09:43:06 UTC
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.

See:- 

https://github.com/droolsjbpm/kie-wb-common/pull/80

https://github.com/droolsjbpm/kie-wb-common/commit/5ccb2ae6296dee60702a593cf7aaf5e6af083ae8 

Version-Release number of selected component (if applicable):

6.3.x (Community)

How reproducible:

n/a