public LocationStepModifier registerNewPseudoComp( MapperTcContext mapperTcContext, TreeItem anyTreeItem, BpelMapperPseudoComp newPseudo) throws ExtRegistrationException { // DirectedList<Object> parentCompPath = BpelPathConverter.singleton().constructObjectLocationList(anyTreeItem, true, true); // LocationStepModifier result = null; try { if (parentCompPath != null) { if (addPseudoCompImpl(parentCompPath, newPseudo)) { VariableDeclaration varDecl = newPseudo.getBaseBpelVariable(); if (varDecl != null) { result = BpelMapperLsmProcessor.registerLsmToVariable( mapperTcContext, varDecl, parentCompPath, newPseudo, mMapperTreeModel.isLeftMapperTree()); } } } } finally { if (result == null) { // remove newly cached pseudo component if it didn't manage // to register it in BPEL removePseudoComp(newPseudo); } } // return result; }
public LocationStepModifier registerPseudoComp( BPELElementsBuilder builder, LsmContainer destination, BpelMapperPseudoComp newPseudoComp) throws ExtRegistrationException { // PseudoComp newBpelPseudo = builder.createExtensionEntity(PseudoComp.class); destination.addExtension(newBpelPseudo); try { BpelMapperPseudoComp.populatePseudoComp( newPseudoComp, newBpelPseudo, (BpelEntity) destination, mMapperTreeModel.isLeftMapperTree()); return newBpelPseudo; } catch (ExtRegistrationException ex) { // // Delete the last PseudoComponent destination.removeExtension(newBpelPseudo); // rethrow the exception throw ex; } }