commit ee57c0d99c221528fa090a91b38bf0e89e5e62a3
Author: Andreas Kohlbecker <a.kohlbecker@bgbm.org>
Date:   Wed Mar 27 13:47:02 2019 +0100

    ref #8050 fixing bug in reloadRegistrtions() and removing remain from previous conflict

diff --git a/src/main/java/eu/etaxonomy/cdm/service/IRegistrationWorkflowService.java b/src/main/java/eu/etaxonomy/cdm/service/IRegistrationWorkflowService.java
index b9e5607c..26cbe76b 100644
--- a/src/main/java/eu/etaxonomy/cdm/service/IRegistrationWorkflowService.java
+++ b/src/main/java/eu/etaxonomy/cdm/service/IRegistrationWorkflowService.java
@@ -37,7 +37,7 @@ public interface IRegistrationWorkflowService {
     boolean createRegistrationforExistingName(RegistrationWorkingSet workingset, TaxonName typifiedName) throws RegistrationValidationException;
 
     @Transactional(readOnly=true)
-    void reloadRegistration(Registration registration);
+    Registration reloadRegistration(Registration registration);
 
     /**
      * Creates a new registration for the name referenced by the {@code taxonNameUUID} parameter
diff --git a/src/main/java/eu/etaxonomy/cdm/service/RegistrationWorkflowService.java b/src/main/java/eu/etaxonomy/cdm/service/RegistrationWorkflowService.java
index 85e3f9f9..07e641c1 100644
--- a/src/main/java/eu/etaxonomy/cdm/service/RegistrationWorkflowService.java
+++ b/src/main/java/eu/etaxonomy/cdm/service/RegistrationWorkflowService.java
@@ -103,7 +103,7 @@ public class RegistrationWorkflowService implements IRegistrationWorkflowService
 
     @Override
     public void addTypeDesignation(UUID typeDesignationUuid, Registration registration) {
-        reloadRegistration(registration);
+        registration = reloadRegistration(registration);
         getRepo().getRegistrationService().addTypeDesignation(registration, typeDesignationUuid);
         getRepo().getRegistrationService().saveOrUpdate(registration);
     }
@@ -127,7 +127,7 @@ public class RegistrationWorkflowService implements IRegistrationWorkflowService
 
         if(!registrationExists){
             Registration blockingRegistration = getRepo().getRegistrationService().createRegistrationForName(nameUUID);
-            reloadRegistration(registration);
+            registration = reloadRegistration(registration);
             registration.getBlockedBy().add(blockingRegistration);
             if(registration.isPersited()){
                 getRepo().getRegistrationService().saveOrUpdate(registration);
@@ -143,7 +143,7 @@ public class RegistrationWorkflowService implements IRegistrationWorkflowService
      * @return
      */
     @Override
-    public void reloadRegistration(Registration registration) {
+    public Registration reloadRegistration(Registration registration) {
         if(registration.isPersited()){
              Registration registrationReloaded = getRepo().getRegistrationService().load(registration.getUuid());
              if(registrationReloaded == null){
@@ -153,6 +153,8 @@ public class RegistrationWorkflowService implements IRegistrationWorkflowService
          } else {
              logger.trace("Registration is not yet persisted.");
          }
+
+        return registration;
     }
 
     /**
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java
index 287d4f75..483293eb 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java
@@ -453,6 +453,7 @@ public class RegistrationWorkingsetPresenter extends AbstractPresenter<Registrat
 
             for(TaxonName name : namesToCheck){
                 if(name != null){
+                    clearSession();
                     doRefreshView |= registrationWorkflowService.addBlockingRegistration(name.getUuid(), registration) != null;
                 }
             }
@@ -625,7 +626,8 @@ public class RegistrationWorkingsetPresenter extends AbstractPresenter<Registrat
 
                 try {
                     clearSession();
-                    getRepo().getSession().clear();
+                    Stack<EditorActionContext>context = ((AbstractPopupEditor)event.getPopup()).getEditorActionContext();
+                    registration = findRegistrationInContext(context);
                     registrationWorkflowService.addTypeDesignation(typeDesignationUuid, registration);
                     nameTypeDesignationPopupEditorRegistrationUUIDMap.remove(event.getPopup());
                 } finally {
