Red Hat Bugzilla – Bug 805671
Copying a process should update its Name, Package and ID properties
Last modified: 2012-05-02 17:54:55 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):
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
Name, Package and ID are same as in the orginal process
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.
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?
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?