modify BaseHapiTerminologySvcImpl saveDeferred method to avoid short circuit that could potentially prevent processing of some deferred value sets and concept maps

This commit is contained in:
Joel Schneider 2018-06-27 02:20:12 -05:00
parent 60ed0dab48
commit b2853b3f9d
1 changed files with 6 additions and 5 deletions

View File

@ -850,15 +850,16 @@ public abstract class BaseHapiTerminologySvcImpl implements IHapiTerminologySvc,
return;
} else if (myDeferredConcepts.isEmpty() && myConceptLinksToSaveLater.isEmpty()) {
processReindexing();
return;
}
TransactionTemplate tt = new TransactionTemplate(myTransactionMgr);
tt.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRES_NEW);
tt.execute(t -> {
processDeferredConcepts();
return null;
});
if(!myDeferredConcepts.isEmpty() || !myConceptLinksToSaveLater.isEmpty()) {
tt.execute(t -> {
processDeferredConcepts();
return null;
});
}
if (myDeferredValueSets.size() > 0) {
tt.execute(t -> {