siri
siri

Reputation: 11

wso2esb - aggregate mediator is not being detected

I am using WSO2 4.0.3 on Mac OSX 10.6 I have Data Services Server feature enabled(3.2.2

working in wso2esb 4.0.3 on aggregate mediator.

Below is the code, where the iterate mediator worked perfectly, but the aggregate mediator does not seem to get recognized, as the log in it is not getting printed .The response from the endpoint is getting printed in the log level=full of outsequence, but the flow is not getting continued in aggregate.

Could anyone from wso2team please confirm whether aggregate behaves as expected in wso2 esb 4.0.3?

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="test" transports="http https" startOnLoad="true" trace="disable" statistics="enable">
<target>
    <inSequence >
        <log level="full" separator=",">
            <property name="InSequence-EntryMessage" value="test - Entering InSequence."/>
        </log>
        <iterate preservePayload="true" attachPath="//REQ" expression="//REQ/MODULE">
            <target>
                <sequence>
                    <payloadFactory>
                        <format>
                            <MODULE>
                                <party_id>$1</party_id>
                            </MODULE>
                        </format>
                        <args>
                            <arg expression="//REQ/MODULE/party_id"/>
                        </args>
                    </payloadFactory>
                    <log level="full" separator=",">
                        <property name="InSequence-iterate" value="formed after iterate"/>
                    </log>
                    <send>
                        <endpoint key="conf:/test/ds_endpoint.xml"/>
                    </send>
                </sequence>
            </target>
        </iterate>
        <log level="custom" separator=",">
            <property name="InSequence-ExitMessage" value="test - Exiting InSequence."/>
        </log>
    </inSequence>
    <outSequence >
        <log level="full" separator=",">
            <property name="ValidResponse" value="test  Sending the Response Back."/>
        </log>
        <aggregate>
            <log level="full" separator=",">
                <property name="ValidResponse" value="TEST ---------------- Sending the Response Back."/>
            </log>
            <correlateOn expression="//TEST"/>
            <completeCondition> 
                <messageCount min="-1" max="-1"/> 
            </completeCondition> 
            <onComplete expression="//TESTALL">
            <log level="full" separator=",">
                <property name="ValidResponse" value="TEST 1 ---------------- Sending the Response Back."/>
            </log>
            <send/>
            </onComplete>
         </aggregate>
        <log level="full" separator=",">
            <property name="OutSequence-ExitMessage" value="test - Exiting OutSequence."/>
        </log>
    </outSequence>
</target>
</proxy>

Appreciate a response on this!

Upvotes: 1

Views: 777

Answers (1)

Malith
Malith

Reputation: 105

Log mediator is only applicable inside "onComplete" tag in Aggregate mediator. So following log will not recognized and it is an expected behavior,

<log level="full" separator=",">
   <property name="ValidResponse" value="TEST ---------------- Sending the Response Back."/>
  </log> 

but the following log which you have added within "onComplete" tag should work,

<log level="full" separator=",">
<property name="ValidResponse" value="TEST 1 ---------------- Sending the Response Back."/>
</log>

Upvotes: 2

Related Questions