Source:
public void saveSequence(OMElement sequenceElement) throws SequenceEditorException { final Lock lock = getLock(); try { lock.lock(); sequenceElement.detach(); CAppArtifactDataService cAppArtifactDataService = ConfigHolder.getInstance(). getcAppArtifactDataService(); if (sequenceElement != null && sequenceElement.getLocalName().equals( XMLConfigConstants.SEQUENCE_ELT.getLocalPart())) { String sequenceName = sequenceElement.getAttributeValue(new QName("name")); SynapseConfiguration config = getSynapseConfiguration(); log.debug("Saving sequence : " + sequenceName); SequenceMediator preSeq = config.getDefinedSequences().get(sequenceName); if (preSeq == null) { handleException("Unable to save sequence " + sequenceName + ". Does not exist"); } else { Mediator mediator = MediatorFactoryFinder.getInstance().getMediator( sequenceElement, getSynapseConfiguration().getProperties()); boolean statisticsEnable = preSeq.isStatisticsEnable(); config.removeSequence(sequenceName); if (mediator instanceof SequenceMediator) { if (statisticsEnable) { ((SequenceMediator) mediator).enableStatistics(); } ((SequenceMediator)mediator).setFileName(preSeq.getFileName()); } config.addSequence(sequenceName, mediator); log.debug("Saved sequence : " + sequenceName + " to the configuration"); SequenceMediator seq = config.getDefinedSequences().get(sequenceName); if (seq != null) { seq.init(getSynapseEnvironment()); if (cAppArtifactDataService.isArtifactDeployedFromCApp(getTenantId(), ServiceBusConstants.SEQUENCE_TYPE + File.separator + sequenceName)) { cAppArtifactDataService.setEdited(getTenantId(), ServiceBusConstants.SEQUENCE_TYPE + File.separator + sequenceName); } else { persistSequence(seq); } } } } else { handleException("Unable to save sequence. Invalid definition"); } } catch (Exception fault) { handleException("Unable to save the Sequence : " + fault.getMessage(), fault); } finally { lock.unlock(); } }

Target:
public void saveSequence(OMElement sequenceElement) throws SequenceEditorException { final Lock lock = getLock(); try { lock.lock(); sequenceElement.detach(); CAppArtifactDataService cAppArtifactDataService = ConfigHolder.getInstance(). getcAppArtifactDataService(); if (sequenceElement != null && sequenceElement.getLocalName().equals( XMLConfigConstants.SEQUENCE_ELT.getLocalPart())) { String sequenceName = sequenceElement.getAttributeValue(new QName("name")); SynapseConfiguration config = getSynapseConfiguration(); log.debug("Saving sequence : " + sequenceName); SequenceMediator preSeq = config.getDefinedSequences().get(sequenceName); if (preSeq == null) { handleException("Unable to save sequence " + sequenceName + ". Does not exist"); } else { Mediator mediator = MediatorFactoryFinder.getInstance().getMediator( sequenceElement, getSynapseConfiguration().getProperties()); boolean statisticsEnable = preSeq.isStatisticsEnable(); config.removeSequence(sequenceName); if (mediator instanceof SequenceMediator) { if (statisticsEnable) { ((SequenceMediator) mediator).enableStatistics(); } ((SequenceMediator)mediator).setFileName(preSeq.getFileName()); } config.addSequence(sequenceName, mediator); log.debug("Saved sequence : " + sequenceName + " to the configuration"); SequenceMediator seq = config.getDefinedSequences().get(sequenceName); String artifactName = getArtifactName(artifactType, sequenceName); if (seq != null) { seq.init(getSynapseEnvironment()); if (cAppArtifactDataService.isArtifactDeployedFromCApp(getTenantId(), artifactName)) { cAppArtifactDataService.setEdited(getTenantId(), artifactName); } else { persistSequence(seq); } } } } else { handleException("Unable to save sequence. Invalid definition"); } } catch (Exception fault) { handleException("Unable to save the Sequence : " + fault.getMessage(), fault); } finally { lock.unlock(); } }