}
}
protected void updateFlows(BaseElement element, String newElementId) {
if (element instanceof FlowNode) {
FlowNode flowNode = (FlowNode) element;
for (SequenceFlow sequenceFlow : flowNode.getIncomingFlows()) {
sequenceFlow.setTargetRef(newElementId);
}
for (SequenceFlow sequenceFlow : flowNode.getOutgoingFlows()) {
sequenceFlow.setSourceRef(newElementId);
}
}
}