Hello,

I have a problem and the differents tutos do not seem to help me.

I am using three different connectors to retrieve data in JSON. Those data
should be aggregated to be sent back. Because I want to gain some process
time, I would like to call those three connectors in parallel. That is why
I try to use the clone mediator and the aggregate one.

But, during the process, it is like if it never goes to the outputSequence
whereas the tutos like this one in [1] does nothing to force the passage to
it.

Here is my sequence where I just use the clone for one connector for my
tests :

<api xmlns="http://ws.apache.org/ns/synapse"; name="MergedComposition"
context="/merge">
   <resource methods="GET">
      <inSequence>
         <call-template target="getParamFromRegistryTemplate"
description="get directory system">
            <with-param name="paramToSetName" value="directorySystem"/>
            <with-param name="targetParamName" value="local_code_system"/>
         </call-template>
         <call-template target="getParamFromRegistryTemplate"
description="get dxcare document types">
            <with-param name="paramToSetName" value="dxCareDocumentTypes"/>
            <with-param name="targetParamName"
value="dxcare.document.types"/>
         </call-template>
         <call-template target="getParamFromRegistryTemplate"
description="get dxcare object types">
            <with-param name="paramToSetName" value="dxCareObjectTypes"/>
            <with-param name="targetParamName" value="dxcare.object.types"/>
         </call-template>
         <sequence key="retrieveDocumentPermissions"/>
         <clone>
            <target>
               <sequence>
                  <myconnector.getDocuments />
                  <log level="full">
                     <property name="DOCUMENTS" value="DOCUMENTS"/>
                  </log>
                  <payloadFactory media-type="xml">
                     <format>
                        <documents xmlns="">         $1        </documents>
                     </format>
                     <args>
                        <arg evaluator="json" expression="$.entry"/>
                     </args>
                  </payloadFactory>
                  <log>
                     <property name="AFTER" value="AFTER"/>
                  </log>
               </sequence>
            </target>
         </clone>
      </inSequence>
      <outSequence>
<log>
                     <property name="OUT" value="OUT"/>
                  </log>
         <aggregate id="documentsAggregation">
            <completeCondition>
               <messageCount min="-1" max="-1"/>
            </completeCondition>
            <onComplete expression="//documents">
               <enrich>
                  <source clone="true" xpath="$body/documents"/>
                  <target type="body"/>
               </enrich>
               <respond/>
            </onComplete>
         </aggregate>
      </outSequence>
      <faultSequence/>
   </resource>
</api>

>From this sequence, I can see in the logs the "AFTER" property showing
"AFTER" but I don't seen any "OUT"

Can you help me, please?

Regards,

Thomas

[1] https://dzone.com/articles/wso2-esb-cloning-and
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to