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

Bug 1038108

Summary: Warning 'User has updated the following resource ... ' sometimes appears when clicking Save in form modeler
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jan Hrcek <jhrcek>
Component: Form ModelerAssignee: Pere Fernàndez <pere.fernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Hrcek <jhrcek>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.0CC: dgutierr, jschatte, pere.fernandez, pzapataf, rrajasek, rzhang
Target Milestone: ER2   
Target Release: 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:01:57 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:
Attachments:
Description Flags
Steps to reproduce - video
none
History in git 1) form created 2) form saved none

Description Jan Hrcek 2013-12-04 12:45:44 UTC
Created attachment 832629 [details]
Steps to reproduce - video

Description of problem:
Error dialog 'User has updated the following resource ... ' - appears randomly when 'Save' is clicked in Form Modeler. By randomly I mean sometimes it appears and sometimes it doesn't, no matter whether the asset has been edited or not.

I suppose this feature was implemented to treat concurrent modifications of single resource/asset by multiple users. However the warning seems to appear nondeterministically even if just ONE user is editting single asset, with just one FormModeler panel opened.

See video attached for steps to reproduce

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

How reproducible:
100% after several rounds of editting the form and clicking Save button.

Steps to Reproduce:
1. In Authoring > Project authoring > create new form
2. Repeat until warning appears
   2a. Add some fields to the form (or perform some other edits)
   2b. Click Save button

Actual results:
Sometimes 'Successfully saved form ...' notification appears,
Sometimes The Error modal with error 'User has updated the following resource ...' appears
The problem is, that it happens quite non-deterministically.

Expected results:
When only 1 user edits the asset, there should be no error modal.

Also when I click "Re-open" button in the error modal, the form is not reopened (as evidenced by clicking Save button again)

Additional info:
This looks more like some issue in Uberfire's handling of underlying Git repo than form modeler itself. See similar issue reported in https://bugzilla.redhat.com/show_bug.cgi?id=1026965

Comment 1 Pere Fernàndez 2013-12-13 15:33:28 UTC
Changed save action on form editor to avoid concurrency error. Added commit message.

Commit (master): https://github.com/droolsjbpm/jbpm-form-modeler/commit/c4288a400643abeb976a1f2c627b8e4dc36ea669

Comment 2 Pere Fernàndez 2013-12-19 13:04:11 UTC
Changed save action on form editor to avoid concurrency error. Added commit message.

Commit (master): https://github.com/droolsjbpm/jbpm-form-modeler/commit/c4288a400643abeb976a1f2c627b8e4dc36ea669

Commit (6.0.x): https://github.com/droolsjbpm/jbpm-form-modeler/commit/01781947c171e04f17525f31f0610707aead5c99

Comment 3 Jan Hrcek 2014-01-22 07:00:59 UTC
Tested with BPMS 6.0.0 CR1 and the problem is still not fixed.

It seems to be working correctly when you open existing form, perform some edits and save (normal 'Save this item' dialog is displayed)

But when you create a new form (New Item > Form) and you click save in the subsequently edited Form Modeler panel (no matter whether you perform some edits or don't), you will again get the error modal "User has updated the following resource ..."

Please review this problem again.

Comment 4 Jan Hrcek 2014-01-22 07:05:56 UTC
By the way I verified, that the commit to fix the problem is present in the CR1 binaries.

Comment 8 Lukáš Petrovický 2014-02-07 16:19:06 UTC
This no longer has a target release of 6.0.0.

Comment 9 Jan Hrcek 2014-02-19 09:29:24 UTC
Checked with BPMS 6.0.1 ER1 and the problem is still the same as described in Comment 3: it is working fine with existing forms, but when user creates new form, makes some edits and then saves, the warning dialog is displayed.

Comment 10 Jan Hrcek 2014-02-19 10:57:44 UTC
I found some additional facts. It seems, that when the form is created, the underlying git commit is done under different user (Jan Hrcek - my name) then the commit done when saving the form (root - the username I am logged in to business central). I don't understand why. Where is the business central reading my name from? Why is the initial commit when creating the form also not done under the user that is logged into business central? Please take a look at the screenshot.

Now it makes sense why, when I press Save in form modeller, the message 'User has updated the following resource ... ' is displayed - because the user who created the form is different from the user who is saving the form

Comment 11 Jan Hrcek 2014-02-19 10:58:25 UTC
Created attachment 865025 [details]
History in git 1) form created 2) form saved

Comment 12 Jan 2014-02-20 16:35:22 UTC
Hi Jan,

I've pushed a fix for the problem that you mention in your comment #10:

master: http://github.com/droolsjbpm/jbpm-form-modeler/commit/670954025

6.0.x: http://github.com/droolsjbpm/jbpm-form-modeler/commit/c030bcd20

Nevertheless, this probably does not fix the issue at hand, because I've been trying to reproduce the 'form modified' popup-issue in hosted mode (to be able to debug it) before applying the aforementioned fix, i.e. having a different user for the form creation and posterior modifications, and I have NOT been able to reproduce it.

It seems to be more a problem a platform level, since this also sometimes  happens in datamodeller and in the process designer.

Comment 13 Pere Fernàndez 2014-02-21 14:23:30 UTC
Since the last modification I'm not able to reproduce it, I've tested it on hosted mode, as7, eap 6.1 and eap 6.1.1

Comment 14 Jan Hrcek 2014-03-07 06:02:54 UTC
Ok, verified with BPMS 6.0.1 ER2