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

Bug 1222656

Summary: Processes can not be restored from previous version
Product: [Retired] JBoss BPMS Platform 6 Reporter: Alessandro Lazarotti <alazarot>
Component: Business CentralAssignee: Tihomir Surdilovic <tsurdilo>
Status: CLOSED EOL QA Contact: Kirill Gaevskii <kgaevski>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.1.0CC: agiertli, kverlaen, lpetrovi
Target Milestone: ER4   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1222657 (view as bug list) Environment:
Last Closed: 2020-03-27 20:07:20 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:    
Bug Blocks: 1222657    

Description Alessandro Lazarotti 2015-05-18 18:28:44 UTC
Description of problem:
Revert back to a previous version of a business process model causes the exception:

14:58:30,356 ERROR [stderr] (http-mackoy/127.0.0.1:8080-2) java.lang.RuntimeException: org.eclipse.jgit.api.errors.ConcurrentRefUpdateException: Could not lock HEAD. RefUpdate return code was: LOCK_FAILURE
14:58:30,357 ERROR [stderr] (http-mackoy/127.0.0.1:8080-2) 	at org.uberfire.java.nio.fs.jgit.util.JGitUtil.commit(JGitUtil.java:608)
14:58:30,357 ERROR [stderr] (http-mackoy/127.0.0.1:8080-2) 	at org.uberfire.java.nio.fs.jgit.util.JGitUtil.commit(JGitUtil.java:506)
14:58:30,357 ERROR [stderr] (http-mackoy/127.0.0.1:8080-2) 	at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.commit(JGitFileSystemProvider.java:1853)
14:58:30,357 ERROR [stderr] (http-mackoy/127.0.0.1:8080-2) 	at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.access$600(JGitFileSystemProvider.java:147)
14:58:30,357 ERROR [stderr] (http-mackoy/127.0.0.1:8080-2) 	at org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider$4.close(JGitFileSystemProvider.java:836)
14:58:30,357 ERROR [stderr] (http-mackoy/127.0.0.1:8080-2) 	at org.uberfire.io.impl.AbstractIOService.write(AbstractIOService.java:609)

.. and the process is not restored.


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

How reproducible:
Always

Steps to Reproduce:
1. Create a process with a start node, task node and end node.
2. Save it adding a comment to the save operation and close the process.
3. Open it again and delete the end node.
4. Save it adding a different comment to the save operation and close the process again.
5. Open the process and go to Overview tab.
6. Select the version saved with the comment added in the step 2. The Designer will open that version, but the commit is not reverted, if closed the tab the current version will still be that one saved in step 4 - no problem - to save the restored process we need to click on Save again, and here we have two problems:
6.1. If a previous version is restored and is tried to save it, Designer will show the message "process contains no changes" and it will not be saved.
6.2. If a previous version is restored and a update is done and then is tried to save it, business-central will throw the exception:

"org.eclipse.jgit.api.errors.ConcurrentRefUpdateException: Could not lock HEAD. RefUpdate return code was: LOCK_FAILURE"

.. and it will not be saved.


Actual results:
See items 6.1 and 6.2 above

Expected results:
Process restored and saved without exceptions 

Additional info:

Comment 3 Tihomir Surdilovic 2015-09-29 01:27:14 UTC
6.2.x: https://github.com/droolsjbpm/jbpm-designer/commit/f4d246551

Comment 4 Kirill Gaevskii 2015-10-19 12:41:24 UTC
It is possible to restore from previous version but new bug 1273019 and bug 1273036 was reported.

Comment 5 Alessandro Lazarotti 2016-03-07 21:30:44 UTC
*** Bug 1170184 has been marked as a duplicate of this bug. ***