Bug 1211882

Summary: Opening designer causes Project Explorer to start displaying packages from different project
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jan Hrcek <jhrcek>
Component: Business CentralAssignee: manstis
Status: CLOSED EOL QA Contact: Lukáš Petrovický <lpetrovi>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.1.0CC: alazarot, hmiura, jlocker, kverlaen, lpetrovi, manstis, smala
Target Milestone: ER5   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:01:53 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
Video showing steps to reproduce the issue none

Description Jan Hrcek 2015-04-15 07:21:23 UTC
Created attachment 1014597 [details]
Video showing steps to reproduce the issue

Description of problem:
When using "Show as links" option in Project Explorer, it sometimes happens, that opening a process definition in Designer causes the Process Explorer to suddenly start showing packages from different project than the one that's currently opened. Observe the detailed steps to reproduce in the video attached.

The problem is that after I "screw" the Proj.Exp. navigation like that, my project will always display packages from different project even after logout/login.

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

How reproducible:
Using the following steps I am able to reproduce this issue in 100% of cases with clear BPM Suite installation.

Steps to Reproduce:
1. Login to business central
2. Go to Administration and clone the bpms-assets repository from git://git.app.eng.bos.redhat.com/bpms-assets.git (add it to example org unit that exists by default in clean BPM Suite installation)
3. Go to Authoring perspective and switch Project Explorer to "Show links" view (the KEY to reproducing the issue!)
4. In Project Explorer navigate to example > bpms-assets > formmodeler
5. open Business Process "AgeInquiry" in the default package.

Actual results:
Despite Project explorer being in "example > bpms-assets > formmodeler", it suddenly start displaying packages from some different project. This is also evidenced by the contents of the .niogit/system.git > branch for the current user > explorer/last.user.nav. This file seems to be corrupted, as it contains invalid navigation information.

Expected results:
Project explorer should display packages and assets of the currently opened project "example > bpms-assets > formmodeler"

Additional info:
Observe steps to reproduce in video. In particular notice:
1) In 1:20, when I click the process definition, during the designer opening the Project Explorer suddenly starts to display packages from different project (in 1:33).
2) In 2:32 I show, that .niogit/system.git {root-uf-user branch} there is invalid content in explorer/last.user.nav. It seems that during designer opening a commit is done, which switches last.user.nav to bpmnBuildTest project (in which we were before switching to formmodeler project) without me navigating to that project.

Comment 1 Toni Rikkola 2015-04-16 10:39:07 UTC
Hi Tiho,

I think the problem is that the designer uses the project context for resolving the packages. Since the context changes while browsing in the project explorer the designer gets confused.

If this is the case it is better to use ProjectService.resolvePackages(Project);

And if I am wrong or you need help feel free to ask or reassign back to me.

Comment 2 Jan Hrcek 2015-09-01 12:55:38 UTC
This issue is really annoying, because sometimes opening designer causes that from that moment onward the project containing the process will display artifacts from DIFFERENT project. The only way to fix this is for user to hack .niogit (reverting the changes done to the explorer/last.user.nav). Proposing blocker flag.

Comment 6 manstis 2015-10-22 13:40:08 UTC
I tested with Community 6.3.x (Product 6.2.x) and opening "AgeInquiry" works fine; Project Explorer keeps it's correct state. 

The issue, I suspect, was caused by Designer creating additional files when the process is opened (I observed it created a Work Item Definition). This signals to Project Explorer to refresh itself. 

There were some fixes made to how Project Explorer stored it's state for BZ1263118 (see referenced). I suspect this resolved the issue reported here too.

Comment 10 Jan Hrcek 2015-11-03 13:43:54 UTC
Testing with BPM Suite 6.2.0 ER5 I'm no longer able to reproduce this issue. Setting to verified.