Bug 805671 - Copying a process should update its Name, Package and ID properties
Copying a process should update its Name, Package and ID properties
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor) (Show other bugs)
BRMS 5.3.0.GA
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Tihomir Surdilovic
Jiri Locker
Depends On:
  Show dependency treegraph
Reported: 2012-03-21 15:11 EDT by Jiri Locker
Modified: 2012-05-02 17:54 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Feature Request
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jiri Locker 2012-03-21 15:11:35 EDT
Description of problem:
When I create a copy of a BPMN2 process in Guvnor, the mentioned properties stay same as in the original process. Given the fact that I have to provide a new name and target package when creating the copy, I expect that the matching process properties will be updated so that I don't have to retype the same values.

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

How reproducible:

Steps to Reproduce:
1. create a process named "TheProcess" in defaultPackage. Its properties are preset as requested in bug 768202
2. create a copy named "NewProcess" in newPackage

Actual results:
Name, Package and ID are same as in the orginal process

Expected results:

Additional info:
Comment 1 Tihomir Surdilovic 2012-03-21 22:50:46 EDT
I don't think we should change the name and ID of the process. ID especially as the user might be copying over things like process image and the process form, which are bound to the process id. 

I do agree with updating the package name. I can't do this on the copy operation itself as Guvnor should not be responsible for this, but what I propose is for designer to check the package name of the process and what Guvnor package it's in, and update the package attribute if they do not match. Hope this is OK.
Comment 2 Jiri Locker 2012-03-22 06:46:44 EDT
I don't see the point in preserving the old ID and name.

Processes are identified by their IDs and so the ID should by unique (at least across the package). If there is more than one process with the same ID, there is no way to handle all of them, either in jBPM console or through knowledge API.

My use case is that I want to create a new process that is similar to an existing one. I don't want to start from a scratch so I copy the existing one and modify the copy. Now I have two processes which have the same ID (and the same name, although the Guvnor asset names are different, which is a bit inconsistent). If I want to start using the new process I have no other choice than to change the ID manually, and I will probably go for the package.Name scheme, so I think this could be the default.

There is not much purpose in copying the process image as it will not match the modified copy. Similar with the task form. I can either generate a new one or copy the original in case I want to reuse it. Or, there could be an extra checkbox in the copy dialog for processes to also copy its task forms and images?
Comment 3 Tihomir Surdilovic 2012-03-22 09:45:58 EDT
You have a valid use case, but it intersects with other possible user cases, like for example user just wanting to copy a process and all of its associated assets (process image, user+task forms etc) from package A to package B, without wanting to change it. Another user case is an user just renaming the entire package, what is the requirements in this scenario? 

For your particular use case, I much rather add functionality to designer where you can in the GUI select another existing process you want to base your new process on. It would then take the BPMN2 of that other process and import it into your new one, similar to what Import from BPMN2 does right now. WDYT?

Note You need to log in before you can comment on or make changes to this bug.