From 511d3e15dff902ce36cc83d275d0e7cabc89d551 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 3 Nov 2022 13:31:18 -0700 Subject: [PATCH] Fix bug (#4239) --- .../main/java/ca/uhn/fhir/mdm/batch2/MdmBatch2Config.java | 7 +++++-- .../ca/uhn/fhir/mdm/batch2/submit/MdmSubmitAppCtx.java | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-storage-mdm/src/main/java/ca/uhn/fhir/mdm/batch2/MdmBatch2Config.java b/hapi-fhir-storage-mdm/src/main/java/ca/uhn/fhir/mdm/batch2/MdmBatch2Config.java index 30ff7140752..51720a90d9b 100644 --- a/hapi-fhir-storage-mdm/src/main/java/ca/uhn/fhir/mdm/batch2/MdmBatch2Config.java +++ b/hapi-fhir-storage-mdm/src/main/java/ca/uhn/fhir/mdm/batch2/MdmBatch2Config.java @@ -32,6 +32,7 @@ import org.springframework.context.annotation.Import; import javax.annotation.PostConstruct; import static ca.uhn.fhir.mdm.batch2.clear.MdmClearAppCtx.MDM_CLEAR_JOB_BEAN_NAME; +import static ca.uhn.fhir.mdm.batch2.submit.MdmSubmitAppCtx.MDM_SUBMIT_JOB_BEAN_NAME; @Configuration @Import({ @@ -47,7 +48,9 @@ public class MdmBatch2Config { @PostConstruct public void start() { - JobDefinition jobDefinition = myApplicationContext.getBean(MDM_CLEAR_JOB_BEAN_NAME, JobDefinition.class); - myJobDefinitionRegistry.addJobDefinitionIfNotRegistered(jobDefinition); + JobDefinition clearJobDefinition = myApplicationContext.getBean(MDM_CLEAR_JOB_BEAN_NAME, JobDefinition.class); + myJobDefinitionRegistry.addJobDefinitionIfNotRegistered(clearJobDefinition); + JobDefinition submitJobDefinition = myApplicationContext.getBean(MDM_SUBMIT_JOB_BEAN_NAME, JobDefinition.class); + myJobDefinitionRegistry.addJobDefinitionIfNotRegistered(clearJobDefinition); } } diff --git a/hapi-fhir-storage-mdm/src/main/java/ca/uhn/fhir/mdm/batch2/submit/MdmSubmitAppCtx.java b/hapi-fhir-storage-mdm/src/main/java/ca/uhn/fhir/mdm/batch2/submit/MdmSubmitAppCtx.java index 16f527bcd05..a4e6a1b9ce3 100644 --- a/hapi-fhir-storage-mdm/src/main/java/ca/uhn/fhir/mdm/batch2/submit/MdmSubmitAppCtx.java +++ b/hapi-fhir-storage-mdm/src/main/java/ca/uhn/fhir/mdm/batch2/submit/MdmSubmitAppCtx.java @@ -35,7 +35,7 @@ import org.springframework.context.annotation.Configuration; @Configuration public class MdmSubmitAppCtx { - private static final String MDM_SUBMIT_JOB_BEAN_NAME = "mdmSubmitJobDefinition"; + public static final String MDM_SUBMIT_JOB_BEAN_NAME = "mdmSubmitJobDefinition"; public static String MDM_SUBMIT_JOB= "MDM_SUBMIT"; @Bean