Executing business logic after an outbound-endpoint ?

View: New views
2 Messages — Rating Filter:   Alert me  

Executing business logic after an outbound-endpoint ?

by p p-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you have the following sequence of things happening:

Inbound endpoint
Inbound transformers
Component
Outbound endpoint
Outbound transformers
Outbound response transformers
Inbound response transformers

How do I execute some additional business logic after the Outbound transformers?

I want to be able to do something like this.

Inbound endpoint
Inbound transformers
Component
Outbound endpoint
Outbound transformers
*Component* <--- No good way to do this is there?
Outbound response transformers
Inbound response transformers

What is the best way to accomplish this?


Here's an example of what we have so far for our mule config:

            <inbound>
                <inbound-endpoint address="${inbound.url}" synchronous="true" connector-ref="httpsConnector">
                    <transformers>
                        <transformer ref="initializationTransformer"/>
                        <transformer ref="loggingTransformer"/>
                    </transformers>
                    <response-transformers>
                        <transformer ref="loggingTransformer"/>
                    </response-transformers>
                </inbound-endpoint>
            </inbound>
            <component>
                <timer-interceptor/>
                <spring-object bean="chainControllerComponent"/>
            </component>
            <outbound>
                <filtering-router>
                    <outbound-endpoint address="${outbound.url1}" synchronous="true" connector-ref="httpConnector">
                        <transformers>
                            <transformer ref="request1Transformer"/>
                            <transformer ref="loggingTransformer"/>
                        </transformers>
                        <response-transformers>
                            <transformer ref="loggingTransformer"/>
                            <transformer ref="response1Transformer"/>
                        </response-transformers>
                    </outbound-endpoint>
                    <expression-filter evaluator="xpath"
                                       expression="//*[local-name()='service'][1]/text()='Service1' and count(//*[local-name()='MyRequest']) > 0"/>
                </filtering-router>
                <filtering-router>
                    <outbound-endpoint address="${outbound.url2}" synchronous="true" connector-ref="httpConnector">
                        <transformers>
                            <transformer ref="request2Transformer"/>
                            <transformer ref="loggingTransformer"/>
                        </transformers>
                        <response-transformers>
                            <transformer ref="loggingTransformer"/>
                            <transformer ref="response2Transformer"/>
                        </response-transformers>
                    </outbound-endpoint>
                    <expression-filter evaluator="xpath"
                                       expression="//*[local-name()='service'][1]/text() = 'Service2' and count(//*[local-name()='MyOtherRequest']) > 0"/>
                </filtering-router>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Executing business logic after an outbound-endpoint ?

by David Dossot-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Put *Component* in an extra service and with and inbound VM endpoint.

D.


On Fri, Oct 16, 2009 at 11:20 AM, Brent Ryan <mule.user.relay@...> wrote:
If you have the following sequence of things happening:

Inbound endpoint
Inbound transformers
Component
Outbound endpoint
Outbound transformers
Outbound response transformers
Inbound response transformers

How do I execute some additional business logic after the Outbound transformers?

I want to be able to do something like this.

Inbound endpoint
Inbound transformers
Component
Outbound endpoint
Outbound transformers
*Component* <--- No good way to do this is there?
Outbound response transformers
Inbound response transformers

What is the best way to accomplish this?


Here's an example of what we have so far for our mule config:

           <inbound>
               <inbound-endpoint address="${inbound.url}" synchronous="true" connector-ref="httpsConnector">
                   <transformers>
                       <transformer ref="initializationTransformer"/>
                       <transformer ref="loggingTransformer"/>
                   </transformers>
                   <response-transformers>
                       <transformer ref="loggingTransformer"/>
                   </response-transformers>
               </inbound-endpoint>
           </inbound>
           <component>
               <timer-interceptor/>
               <spring-object bean="chainControllerComponent"/>
           </component>
           <outbound>
               <filtering-router>
                   <outbound-endpoint address="${outbound.url1}" synchronous="true" connector-ref="httpConnector">
                       <transformers>
                           <transformer ref="request1Transformer"/>
                           <transformer ref="loggingTransformer"/>
                       </transformers>
                       <response-transformers>
                           <transformer ref="loggingTransformer"/>
                           <transformer ref="response1Transformer"/>
                       </response-transformers>
                   </outbound-endpoint>
                   <expression-filter evaluator="xpath"
                                      expression="//*[local-name()='service'][1]/text()='Service1' and count(//*[local-name()='MyRequest']) > 0"/>
               </filtering-router>
               <filtering-router>
                   <outbound-endpoint address="${outbound.url2}" synchronous="true" connector-ref="httpConnector">
                       <transformers>
                           <transformer ref="request2Transformer"/>
                           <transformer ref="loggingTransformer"/>
                       </transformers>
                       <response-transformers>
                           <transformer ref="loggingTransformer"/>
                           <transformer ref="response2Transformer"/>
                       </response-transformers>
                   </outbound-endpoint>
                   <expression-filter evaluator="xpath"
                                      expression="//*[local-name()='service'][1]/text() = 'Service2' and count(//*[local-name()='MyOtherRequest']) > 0"/>
               </filtering-router>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email