Skip to content

Commit

Permalink
Parvathy|BAH-3375|Refactor. Normal and Failed Event Sequencing
Browse files Browse the repository at this point in the history
  • Loading branch information
parvathy00 committed Dec 7, 2023
1 parent 813ba58 commit 50c1c15
Showing 1 changed file with 27 additions and 31 deletions.
58 changes: 27 additions & 31 deletions openerp-atomfeed-service/src/main/resources/jobs-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<property name="targetMethod" value="processFeed"/>
<property name="concurrent" value="false"/>
</bean>

<bean id="openerpCustomerFeedQuartzFailedJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpCustomerFeedJob"/>
<property name="targetMethod" value="processFailedEvents"/>
Expand All @@ -29,7 +28,6 @@
<property name="targetMethod" value="processFeed"/>
<property name="concurrent" value="false"/>
</bean>

<bean id="openerpDrugFeedQuartzFailedJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpDrugFeedJob"/>
<property name="targetMethod" value="processFailedEvents"/>
Expand All @@ -41,7 +39,6 @@
<property name="targetMethod" value="processFeed"/>
<property name="concurrent" value="false"/>
</bean>

<bean id="openerpSaleOrderFeedQuartzFailedJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpSaleOrderFeedJob"/>
<property name="targetMethod" value="processFailedEvents"/>
Expand All @@ -53,7 +50,6 @@
<property name="targetMethod" value="processFeed"/>
<property name="concurrent" value="false"/>
</bean>

<bean id="openelisSaleOrderFeedQuartzFailedJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openelisSaleOrderFeedJob"/>
<property name="targetMethod" value="processFailedEvents"/>
Expand All @@ -65,37 +61,40 @@
<property name="targetMethod" value="execute"/>
<property name="concurrent" value="false"/>
</bean>

<bean id="eventsPublisherJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpEventsPublisherJob"/>
<property name="targetMethod" value="execute"/>
<property name="concurrent" value="false"/>
</bean>

<bean id="openerpLabTestFeedQuartzJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpLabTestFeedJob"/>
<property name="targetMethod" value="processFeed"/>
<property name="concurrent" value="false"/>
</bean>
<bean id="openerpLabPanelFeedQuartzJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpLabPanelFeedJob"/>
<property name="targetMethod" value="processFeed"/>
<property name="concurrent" value="false"/>
</bean>
<bean id="openerpRadiologyTestFeedQuartzJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpRadiologyTestFeedJob"/>
<property name="targetMethod" value="processFeed"/>
<property name="concurrent" value="false"/>
</bean>

<bean id="openerpLabTestFeedFailedQuartzJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpLabTestFeedJob"/>
<property name="targetMethod" value="processFailedEvents"/>
<property name="concurrent" value="false"/>
</bean>

<bean id="openerpLabPanelFeedQuartzJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpLabPanelFeedJob"/>
<property name="targetMethod" value="processFeed"/>
<property name="concurrent" value="false"/>
</bean>
<bean id="openerpLabPanelFeedFailedQuartzJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpLabPanelFeedJob"/>
<property name="targetMethod" value="processFailedEvents"/>
<property name="concurrent" value="false"/>
</bean>

<bean id="openerpRadiologyTestFeedQuartzJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpRadiologyTestFeedJob"/>
<property name="targetMethod" value="processFeed"/>
<property name="concurrent" value="false"/>
</bean>
<bean id="openerpRadiologyTestFeedFailedQuartzJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpRadiologyTestFeedJob"/>
<property name="targetMethod" value="processFailedEvents"/>
Expand All @@ -107,14 +106,12 @@
<property name="targetMethod" value="processFeed"/>
<property name="concurrent" value="false"/>
</bean>

<bean id="openerpSaleableFeedFailedQuartzJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="openerpSaleableFeedJob"/>
<property name="targetMethod" value="processFailedEvents"/>
<property name="concurrent" value="false"/>
</bean>


<!-- simple trigger specify repeat interval and delay time -->
<bean id="customerFeedJobTrigger"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
Expand All @@ -128,6 +125,7 @@
<property name="cronExpression" value="0/30 * * * * ?" />
<property name="startDelay" value="${scheduler.initial.delay}" />
</bean>

<bean id="saleOrderFeedJobTrigger"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="openerpSaleOrderFeedQuartzJob" />
Expand Down Expand Up @@ -174,28 +172,29 @@
<property name="cronExpression" value="0/30 * * * * ?" />
<property name="startDelay" value="${scheduler.initial.delay}" />
</bean>
<bean id="openerpLabPanelFeedJobTrigger"
<bean id="openerpLabTestFeedFailedJobTrigger"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="openerpLabPanelFeedQuartzJob" />
<property name="jobDetail" ref="openerpLabTestFeedFailedQuartzJob" />
<property name="cronExpression" value="0/30 * * * * ?" />
<property name="startDelay" value="${scheduler.initial.delay}" />
</bean>
<bean id="openerpRadiologyTestFeedJobTrigger"

<bean id="openerpLabPanelFeedJobTrigger"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="openerpRadiologyTestFeedQuartzJob" />
<property name="jobDetail" ref="openerpLabPanelFeedQuartzJob" />
<property name="cronExpression" value="0/30 * * * * ?" />
<property name="startDelay" value="${scheduler.initial.delay}" />
</bean>

<bean id="openerpLabTestFeedFailedJobTrigger"
<bean id="openerpLabPanelFeedFailedJobTrigger"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="openerpLabTestFeedFailedQuartzJob" />
<property name="jobDetail" ref="openerpLabPanelFeedFailedQuartzJob" />
<property name="cronExpression" value="0/30 * * * * ?" />
<property name="startDelay" value="${scheduler.initial.delay}" />
</bean>
<bean id="openerpLabPanelFeedFailedJobTrigger"

<bean id="openerpRadiologyTestFeedJobTrigger"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="openerpLabPanelFeedFailedQuartzJob" />
<property name="jobDetail" ref="openerpRadiologyTestFeedQuartzJob" />
<property name="cronExpression" value="0/30 * * * * ?" />
<property name="startDelay" value="${scheduler.initial.delay}" />
</bean>
Expand Down Expand Up @@ -225,7 +224,6 @@
<property name="cronExpression" value="0/30 * * * * ?" />
<property name="startDelay" value="${scheduler.initial.delay}" />
</bean>

<bean id="openerpSaleableFeedFailedJobTrigger"
class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="openerpSaleableFeedFailedQuartzJob"/>
Expand All @@ -246,10 +244,10 @@
<ref bean="eventRecordsNumberOffsetMarkerTrigger"/>
<ref bean="eventPublisherTrigger"/>
<ref bean="openerpLabTestFeedJobTrigger" />
<ref bean="openerpLabPanelFeedJobTrigger" />
<ref bean="openerpRadiologyTestFeedJobTrigger" />
<ref bean="openerpLabTestFeedFailedJobTrigger" />
<ref bean="openerpLabPanelFeedJobTrigger" />
<ref bean="openerpLabPanelFeedFailedJobTrigger" />
<ref bean="openerpRadiologyTestFeedJobTrigger" />
<ref bean="openerpRadiologyTestFeedFailedJobTrigger" />
<ref bean="openerpDrugFeedQuartzJobTrigger" />
<ref bean="openerpDrugFeedQuartzFailedJobTrigger" />
Expand All @@ -259,7 +257,6 @@
</constructor-arg>
</bean>


<!-- scheduler factory bean to bind,the executing code and time intervals
together -->
<bean id="quartzSchedulerBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
Expand Down Expand Up @@ -294,7 +291,6 @@
<constructor-arg ref="atomFeedClientHelper"/>
</bean>


<bean id="openerpSaleOrderFeedJob" class="org.bahmni.feed.openerp.job.OpenERPSaleOrderFeedJob" scope="prototype" >
<constructor-arg ref="simpleFeedJob"/>
</bean>
Expand Down

0 comments on commit 50c1c15

Please sign in to comment.