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