All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ples.mule-example-loanbroker-esn.3.3.0-RC3.source-code.loan-broker-sync-flow-config.xml Maven / Gradle / Ivy

Go to download

The Loan Broker example application is based on the example presented in the Enterprise Integration Patterns book. This chapter of the book is available online so you can see a detailed description of the application here (http://www.eaipatterns.com/ComposedMessagingWS.html).

There is a newer version: 3.5.0-bighorn
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:spring="http://www.springframework.org/schema/beans" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
    xmlns:client="http://www.mulesoft.org/schema/mule/client"
    xmlns:pattern="http://www.mulesoft.org/schema/mule/pattern"
    xsi:schemaLocation="
                http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
                http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
                http://www.mulesoft.org/schema/mule/client http://www.mulesoft.org/schema/mule/client/current/mule-client.xsd
                http://www.mulesoft.org/schema/mule/pattern http://www.mulesoft.org/schema/mule/pattern/current/mule-pattern.xsd
                http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd">

    <description>
        This loan broker example is modeled on the Enterprise integration Patterns book sample.
        This
        implementation differs in that this configuration uses a synchronous model where
        each component is
        invoked from the LoanBroker component.
     </description>

    <client:remote-dispatcher-agent>
        <client:remote-endpoint address="tcp://localhost:5555" exchange-pattern="request-response" />
    </client:remote-dispatcher-agent>

    <!-- Synchronous VM connector (messages are processed in the same execution thread) -->
    <vm:connector name="syncVm" />


    <flow name="loan-broker">
        <inbound-endpoint ref="CustomerRequests" exchange-pattern="request-response" />
        <component class="org.mule.example.loanbroker.esn.SynchronousLoanBroker">
            <binding interface="org.mule.example.loanbroker.credit.CreditAgencyService">
                <outbound-endpoint ref="CreditAgency" exchange-pattern="request-response" />
            </binding>
        </component>
        <component class="org.mule.example.loanbroker.lender.DefaultLender" />
        <expression-filter expression="payload.lenders.endpoint!=null" evaluator="groovy" />
        <request-reply timeout="10000">
            <recipient-list evaluator="groovy" expression="payload.lenders.endpoint"/>
            <inbound-endpoint ref="LoanBrokerQuotes">
                <custom-aggregator class="org.mule.example.loanbroker.routers.BankQuotesResponseAggregator" />
            </inbound-endpoint>
        </request-reply>
    </flow>

    <!--
     The credit agency service will get the credit profile for a customer
     -->
    <pattern:simple-service name="TheCreditAgencyService" endpoint-ref="CreditAgencyIn"
        component-class="org.mule.example.loanbroker.credit.DefaultCreditAgency" />

    <!--
        These are mock bank services that represent remote bank loan services One or more of these are
        selected by the LenderService and a request is routed to them. The lenderService outbound router also
        defines a replyTo property which will be used by Mule to route the responses back to the
        LoanBrokerQuotes destination
    -->

    <flow name="bank1flow">
        <inbound-endpoint ref="Bank1In" exchange-pattern="one-way"/>
        <component class="org.mule.example.loanbroker.bank.Bank"/>
        <outbound-endpoint ref="LoanBrokerQuotes" exchange-pattern="one-way"/>
    </flow>
    <flow name="bank2flow">
        <inbound-endpoint ref="Bank2In" exchange-pattern="one-way"/>
        <component class="org.mule.example.loanbroker.bank.Bank"/>
        <outbound-endpoint ref="LoanBrokerQuotes" exchange-pattern="one-way"/>
    </flow>
    <flow name="bank3flow">
        <inbound-endpoint ref="Bank3In" exchange-pattern="one-way"/>
        <component class="org.mule.example.loanbroker.bank.Bank"/>
        <outbound-endpoint ref="LoanBrokerQuotes" exchange-pattern="one-way"/>
    </flow>
    <flow name="bank4flow">
        <inbound-endpoint ref="Bank4In" exchange-pattern="one-way"/>
        <component class="org.mule.example.loanbroker.bank.Bank"/>
        <outbound-endpoint ref="LoanBrokerQuotes" exchange-pattern="one-way"/>
    </flow>
    <flow name="bank5flow">
        <inbound-endpoint ref="Bank5In" exchange-pattern="one-way"/>
        <component class="org.mule.example.loanbroker.bank.Bank"/>
        <outbound-endpoint ref="LoanBrokerQuotes" exchange-pattern="one-way"/>
    </flow>

</mule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy