Process process = model.getBpmnModel().getProcess(parentPool.getId());
model.getBpmnModel().getProcesses().remove(process);
model.getBpmnModel().getPools().remove(parentPool);
PictogramElement poolElement = getFeatureProvider().getPictogramElementForBusinessObject(parentPool);
IRemoveContext poolRc = new RemoveContext(poolElement);
IRemoveFeature poolRemoveFeature = getFeatureProvider().getRemoveFeature(poolRc);
if (poolRemoveFeature != null) {
poolRemoveFeature.remove(poolRc);
}
} else {
Shape poolShape = (Shape) getFeatureProvider().getPictogramElementForBusinessObject(parentPool);
ResizeShapeContext resizeContext = new ResizeShapeContext(poolShape);