Community
Participate
Working Groups
Though we're waiting to see what the Graphiti team does for a recent bug found with "rename" not working properly, it would be good to allow users to save a copy of the currently open file as another filename. For example, if the user makes some changes they don't want to pollute the main file with, perhaps they do a "Save As" and add "_rev1" to the filename to differentiate it from the original. Currently the File->Save As menu is disabled in the BPMN2 Designer editor.
Created attachment 219415 [details] BPMN2 Modeler Save As bug fix proposal
Hi, I have attached a solution proposal for this fix. Approach is, 1) When user makes changes to a bpmn file (e.g. process_1.bpmn) and selects save as 2) Get hold of new file (e.g. process_1_rev1.bpmn) from the dialog 3) Create a temporary (e.g. temp.bpmn) file which holds the original/old file contents 4) Save the current bpmn (process_1.bpmn) file 5) Move(IResource.move()) the current file (process_1.bpmn) to new file name(process_1_rev1.bpmn) 6) Move the temp (temp.bpmn)file to old file name (process_1.bpmn) 7) Open the new file editor (process_1_rev1.bpmn) and close the old file (process_1.bpmn) editor I have tested with an existing bpmn file. Open the existing bpmn file editor and try to save as.. and it works. Please have a look at the attached proposal. Let me your feedback on this. Thanks Deepak
Thanks for the patch Deepak! I've applied this to the editor code and tested with both helios and indigo builds - looks good! The only thing I had to change was to replace the IFile.move() with an IFile.copy() because it was interfering with the editor's resource listener. I didn't understand the use of a temp.bpmn file (not a good idea, as this file may already exist!) so I simply removed that part of the code. If you have time, please test the new changes to make sure I didn't miss anything. We will publish a new build tomorrow which contains this fix. Thanks!