First, we have a background: we have a Activiti workflow system already on-line, the operation of the flowchart has been packaged to deploy, view, delete the interface. At this point the customer proposes to modify the node name in the individual flowchart.
My first idea is to modify the flowchart BPMN file locally, then go to the client first call the delete interface to delete the old flowchart, and then call the deployment interface to add the modified flowchart, however, in fact, because the system is on-line, there is a large number of running workflow data, once the delete operation, delete the flowchart at the same time, All the relevant workflow data will be emptied.
My second idea is to modify the node name directly where the client saves the flowchart. And I found a little bit. The flowchart of Discovery Activiti is stored in the database in the form of binary code, this is not to say must not change, but certainly not good change.
The final approach:
Observing the structure of the database, the flowchart name_, Key_ and other character attributes are saved in the table Act_re_procdef, and BPMN, PNG and other file attributes are saved in the table Act_ge_bytearray, two tables through deployment_id_ column for a one-to-many association.
Therefore, the modified new flowchart can be added directly with the deployment interface, the old flowchart of the Act_ge_bytearray table data is deleted, the new flowchart of the Act_re_procdef table data is deleted, and then the new flowchart Act_ge_ ByteArray table data in the DEPLOYMENT_ID_ modified to the old Flowchart act_re_procdef table Data deployment_id_, complete.
Activiti How to replace a deployed flowchart