我有一個項目,我在其中創建了10個流程。 其中,8個流與不同的隊列連接。此外,我正在使用Java轉換器進行一些轉換並將轉換後的文件放在某個文件夾中騾子問題,如果在一個項目中有多個流程
Noe問題是所有10個流都在同一時間觸發。如果兩個隊列正在傳遞一些數據,則會同時觸發相應的兩個流。我只想在第一次流程停止時觸發另一個流程,因爲在那裏應用了一個commom java類,因爲我沒有得到確切的結果。
我沒有流依賴。這就是爲什麼我不能使用流參考。此外,我使用處理策略作爲最大1線程,因爲我需要從一個隊列中逐一處理消息。
幫我解決這個問題。這是我的XML流量的
<queued-asynchronous-processing-strategy name="allowOneThread" maxThreads="1" doc:name="Queued Asynchronous Processing Strategy" threadWaitTimeout="2000"/>
<spring:beans>
<context:property-placeholder location="classpath:mule-app.properties" />
</spring:beans>
<wmq:connector name="WMQ" hostName="${wmq.hostname}" port="${wmq.port}" queueManager="${wmq.queue.manager}" username="${wmq.username}" password="${wmq.password}" validateConnections="true" doc:name="WMQ" channel="${wmq.channel}"/>
<file:connector name="File" autoDelete="false" streaming="true" validateConnections="true" doc:name="File" pollingFrequency="20000"/>
<flow name="CatalogueFlow_AB" doc:name="CatalogueFlow_AB" processingStrategy="allowOneThread">
<wmq:inbound-endpoint queue="${wmq.queue.nameCT_AB}" doc:name="WMQ" connector-ref="WMQ"/>
<object-to-string-transformer doc:name="File Mapping"/>
<custom-transformer class="com.tcs.sdm.kcm.catalog.ServiceController_AB" doc:name="Java"/>
<logger level="INFO" doc:name="CAT Logger" category="Audit_LogCAT" message="******************Entered Catalogue SOAP File with Province Name AB is Processed from queue*********"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<logger level="INFO" doc:name="CAT Exception Logger" category="Audit_LogCAT" message="*******************************Entered Catalogue SOAP File with Province Name AB is having error: #[exception.causeException]****************"/>
</catch-exception-strategy>
</flow>
<flow name="CatalogueFlow_BC" doc:name="CatalogueFlow_BC" processingStrategy="allowOneThread">
<wmq:inbound-endpoint queue="${wmq.queue.nameCT_BC}" connector-ref="WMQ" doc:name="WMQ"/>
<object-to-string-transformer doc:name="File Mapping"/>
<custom-transformer class="com.tcs.sdm.kcm.catalog.ServiceController_BC" doc:name="Java"/>
<logger message="******************Entered Catalogue SOAP File with Province Name BC is Processed from queue*********" level="INFO" category="Audit_LogCAT" doc:name="CAT Logger"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<logger message="*******************************Entered Catalogue SOAP File with Province Name BC is having error: #[exception.causeException]****************" level="INFO" category="Audit_LogCAT" doc:name="CAT Exception Logger"/>
</catch-exception-strategy>
</flow>
<flow name="CatalogueFlow_ON" doc:name="CatalogueFlow_ON" processingStrategy="allowOneThread">
<wmq:inbound-endpoint queue="${wmq.queue.nameCT_ON}" connector-ref="WMQ" doc:name="WMQ"/>
<object-to-string-transformer doc:name="File Mapping"/>
<custom-transformer class="com.tcs.sdm.kcm.catalog.ServiceController_ON" doc:name="Java"/>
<logger message="******************Entered Catalogue SOAP File with Province Name ON is Processed from queue*********" level="INFO" category="Audit_LogCAT" doc:name="CAT Logger"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<logger message="*******************************Entered Catalogue SOAP File with Province Name ON is having error: #[exception.causeException]****************" level="INFO" category="Audit_LogCAT" doc:name="CAT Exception Logger"/>
</catch-exception-strategy>
</flow>
<flow name="CatalogueFlow_MB" doc:name="CatalogueFlow_MB" processingStrategy="allowOneThread">
<wmq:inbound-endpoint queue="${wmq.queue.nameCT_MB}" connector-ref="WMQ" doc:name="WMQ"/>
<object-to-string-transformer doc:name="File Mapping"/>
<custom-transformer class="com.tcs.sdm.kcm.catalog.ServiceController_MB" doc:name="Java"/>
<logger message="******************Entered Catalogue SOAP File with Province Name MB is Processed from queue*********" level="INFO" category="Audit_LogCAT" doc:name="CAT Logger"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<logger message="*******************************Entered Catalogue SOAP File with Province Name MB is having error: #[exception.causeException]****************" level="INFO" category="Audit_LogCAT" doc:name="CAT Exception Logger"/>
</catch-exception-strategy>
</flow>
<flow name="InterchangablePriority_AB" doc:name="InterchangablePriority_AB" processingStrategy="allowOneThread">
<wmq:inbound-endpoint queue="${wmq.queue.nameIP_AB}" doc:name="WMQ" connector-ref="WMQ"/>
<object-to-string-transformer doc:name="File Mapping"/>
<custom-transformer class="com.tcs.sdm.kcm.interchangeablePriority.IPController_AB" doc:name="Java"/>
<logger level="INFO" doc:name="IP Logger" category="Audit_LogIP" message="******************Entered IP SOAP File with Province Name AB is Processed from queue*********"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<logger level="INFO" doc:name="IP Exception Logger" category="Audit_LogIP" message="*******************************Entered IP SOAP File with Province Name AB is having error: #[exception.causeException]****************"/>
</catch-exception-strategy>
</flow>
<flow name="InterchangablePriority_BC" doc:name="InterchangablePriority_BC" processingStrategy="allowOneThread">
<wmq:inbound-endpoint queue="${wmq.queue.nameIP_BC}" connector-ref="WMQ" doc:name="WMQ"/>
<object-to-string-transformer doc:name="File Mapping"/>
<custom-transformer class="com.tcs.sdm.kcm.interchangeablePriority.IPController_BC" doc:name="Java"/>
<logger message="******************Entered IP SOAP File with Province Name BC is Processed from queue*********" level="INFO" category="Audit_LogIP" doc:name="IP Logger"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<logger message="*******************************Entered IP SOAP File with Province Name BC is having error: #[exception.causeException]****************" level="INFO" category="Audit_LogIP" doc:name="IP Exception Logger"/>
</catch-exception-strategy>
</flow>
<flow name="InterchangablePriority_ON" doc:name="InterchangablePriority_ON" processingStrategy="allowOneThread">
<wmq:inbound-endpoint queue="${wmq.queue.nameIP_ON}" connector-ref="WMQ" doc:name="WMQ"/>
<object-to-string-transformer doc:name="File Mapping"/>
<custom-transformer class="com.tcs.sdm.kcm.interchangeablePriority.IPController_ON" doc:name="Java"/>
<logger message="******************Entered IP SOAP File with Province Name ON is Processed from queue*********" level="INFO" category="Audit_LogIP" doc:name="IP Logger"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<logger message="*******************************Entered IP SOAP File with Province Name ON is having error: #[exception.causeException]****************" level="INFO" category="Audit_LogIP" doc:name="IP Exception Logger"/>
</catch-exception-strategy>
</flow>
<flow name="InterchangablePriority_MB" doc:name="InterchangablePriority_MB" processingStrategy="allowOneThread">
<wmq:inbound-endpoint queue="${wmq.queue.nameIP_MB}" connector-ref="WMQ" doc:name="WMQ"/>
<object-to-string-transformer doc:name="File Mapping"/>
<custom-transformer class="com.tcs.sdm.kcm.interchangeablePriority.IPController_MB" doc:name="Java"/>
<logger message="******************Entered IP SOAP File with Province Name MB is Processed from queue*********" level="INFO" category="Audit_LogIP" doc:name="IPLogger"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<logger message="*******************************Entered IP SOAP File with Province Name MB is having error: #[exception.causeException]****************" level="INFO" category="Audit_LogIP" doc:name="IP Exception Logger"/>
</catch-exception-strategy>
</flow>
我認爲你需要發佈你的xml配置文件中描述的所有內容 – secario
我在問題本身附加了XML – user3675877