Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1091524

Summary: Jars uploaded to BPM Suite artifact repository are never updated
Product: [Retired] JBoss BPMS Platform 6 Reporter: Alessandro Lazarotti <alazarot>
Component: Business CentralAssignee: Maciej Swiderski <mswiders>
Status: CLOSED CURRENTRELEASE QA Contact: Zuzana Krejčová <zkrejcov>
Severity: urgent Docs Contact:
Priority: high    
Version: 6.0.0CC: david, kverlaen, lpetrovi, rrajasek, vigoyal
Target Milestone: ER3   
Target Release: 6.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1113531 (view as bug list) Environment:
Last Closed: 2014-08-06 19:50:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1062547    
Bug Blocks: 1113531    
Attachments:
Description Flags
Jar with process none

Description Alessandro Lazarotti 2014-04-25 19:27:39 UTC
Created attachment 889891 [details]
Jar with process

The scenarios is: 
- Customer is uploading jars developed in JBDS containing process files to BPM Suite artefact repository in Business Central.
- Once uploaded the jar, it is added to project as dependency and so they click on build/save the project.

After these steps are did, the process is available in process definition view and they can start/complete, etc in our execution server.

The problem is, if an user tries to update that jar already uploaded, re-uploading  the same jar with a new content is no possible.
Actually the artifact repository view shows the jar updated wih a new timestamp, however even if the project is rebuild it still uses the old jar. The only way to get the project updated is restarting the server.

A workaround is defining a new version for that JAR, updating the POM.xml and the pom.properties. Also the process version inside the jar also must be changed or the result is unpredictable (sometimes the exection server choose an implementation, sometime another ) - changing the process version it always get the last version. It is just a workaround, it does not sound as an good/correct procedure to get a jar updated.

The problem with this workaround is if customer is using -SNAPSHOT.jar - the jar does not have a version to change. Even updating the internal process version it does not work - the project still get the first jar uploaded and its process.

Comment 1 Alessandro Lazarotti 2014-04-28 19:22:22 UTC
I tried reproduce again the problem about the need of define a new bpm version but i couldn't, so ignore that for now - just updating om.properties + pom.xml seems being enough - the issue about snapshots remain.

Comment 2 Kris Verlaenen 2014-04-30 00:13:49 UTC
Note that uploading the same (fixed, non-SNAPSHOT) version doesn't really make sense, as maven won't know it was updated, this will NOT work if it was ever deployed.  So we probably should add a very strong warning to the UI if the user tries to do this.

Mario, could you take a look why overriding the SNAPSHOT version might not work?  Could you check if kie-ci is able to successfully pick up the new SNAPSHOT jar?  Note that the issue might be later (during the setup of the jBPM execution server) as well, in which case you can let me know and we'll reassign.  But it would be useful if you could check whether kie-ci is able to correctly pick up an updated SNAPSHOT jar that was uploaded manually.

Comment 3 Mario Fusco 2014-05-05 10:27:12 UTC
As written by Kris re-uploading a project with an already existing fixed version doesn't make sense in maven and then also kie-ci cannot support this scenario.

As for the snapshot issue it has been reported here https://bugzilla.redhat.com/show_bug.cgi?id=1062547 and fixed with 6.0.1. I double checked that snapshot jars are picked up correctly by the KieScanner. 

Kris, I am reassigning this to you so you could also verify that everything is working fine on the jBPM side.

Comment 4 Alessandro Lazarotti 2014-05-05 12:59:24 UTC
I've also verified, it works when used KieScanner in client side, however it doesn't work if used the jbpm execution server as reported in this BZ even in 6.0.1

Comment 5 Maciej Swiderski 2014-05-08 16:52:06 UTC
I tried several times to reproduce it but unfortunately I cannot, here are the steps I followed to reproduce it:
1. created simple project, with one process in kie-wb
2. uploaded HelloWorld jar into kie-wb (After changing its version to be SNAPSHOT)
3. added HelloWorld snapshot to simple project dependencies
4. build the project and run it
5. executed process from HelloWorld jar and it printed out Hello
6. manually changed the HelloWorld process to print something else
7. uploaded new version of HelloWorld jar into kie-wb
8. rebuild and redeploy simple project in kie-wb
9. execute the HelloWorld process again
10. it prints out the updated value from script task

I have tried both master and 6.0.x and on both it works fine

Comment 6 Alessandro Lazarotti 2014-05-09 03:25:25 UTC
Hi Maciej, I am using BPM Suite 6.0.1 and following the steps described by you and using the attached Jar (modified the version to 1.0-SNAPSHOT) I can reproduce the issue consistently.

Comment 7 Maciej Swiderski 2014-05-12 09:16:50 UTC
marking it as modified as it cannot be reproduced on master and 6.0.x so it might be the case it was already resolved in another commit.

Comment 8 Zuzana Krejčová 2014-06-05 10:07:36 UTC
Verified with 6.0.2 ER3.

Comment 9 Zuzana Krejčová 2014-06-05 10:21:53 UTC
Note, please, that I verified only the SNAPSHOT scenario, considering that you shouldn't be modifying a non-snapshot artifact unless you also modify its version - see comment 2, comment 3.
I'd like to ask for this (that you should not re-upload modified non-snapshot artifacts) to be documented in the User Guide - Artifact Repository chapter.
(Added Vikram Goyal to CC.)

Comment 10 Vikram Goyal 2014-06-26 11:06:22 UTC
Hi Zuzana,

I am cloning this to a docs bug so that I can track the work for it. 

https://bugzilla.redhat.com/show_bug.cgi?id=1113531.

Also, I am setting the required_docs_text for this bug to - since we are going to document this.

Vikram