AS IS: The “Import a process model” dialog of the “Modeler App” running via “Import Process” is currently (in version 6.6.1.5) importing a process definition (.bpmn or .bpmn20.xml BPMN XML file) even if this results in a second Workflow with the same key. This in turn will result in an error message “Model with provided key already exists berta-approval-workflow” when saving one of these process models.
TO BE: We are using the modeler as a central tool to manage our workflows. Workflows are then exported and used by placing them under resources/processes of our spring boot application. Because there is no branching concept in the Modeler App we are going to “Duplicate this model”, playing around with the duplicate and then are going to re-integrate that copy into the “original” one as a new version. So my proposal is to have a new choice box “Create new version if the key of that workflow already exists.” in the “Import a process model” dialog. If that element is checked, then the imported checks of the model to import is already existing in the database with respect to the key of the model and if so it is just imported as a new version.
Question: Is this a valuable extension to the Modeler App?
Implementation note: I would like to add the checkbox in resources\static\modeler\views\popup\process-import.html, forwarding its value in resources/static/modeler/scripts/controllers/processes.js to org.flowable.ui.modeler.rest.app.ModelsResource#importProcessModel as an additional parameter which in turn delegates to org.flowable.ui.modeler.service.FlowableModelQueryService#importProcessModel. This method then checks if this is an existing key and saves this as a new version instead of a new process if the flag has been set to true. This can be done by delegating to org.flowable.ui.modeler.service.ModelServiceImpl#importNewVersion.
Question: Should I try to make a PR for that? If so should the PR be made against 6.6.1.5 branch?
BR,
Tom