简体   繁体   中英

Unable to consolidate data from Salesforce using salesforce connector and aggregate in wso2

I'm trying to extract data from salesforce using iterator and finally consolidate the data using aggregator.

<property name="Result" scope="default">
            <Result xmlns=""/>
        </property>
        <iterate xmlns:sfdc="http://wso2.org/salesforce/adaptor" continueParent="true" expression="//sfdc:iterator" id="SFDCData" sequential="true">
            <target>
                <sequence>
                    <salesforce.queryMore configKey="MySFConfig">
                        <batchSize>200</batchSize>
                    </salesforce.queryMore>
                    <payloadFactory media-type="xml">
                        <format>
                            <result xmlns="">$1
                            </result>
                        </format>
                        <args>
                            <arg evaluator="xml" expression="$body/*"/>
                        </args>
                    </payloadFactory>
                </sequence>
            </target>
        </iterate>
        <aggregate>
            <correlateOn expression="SFDCData"/>
            <completeCondition>
                <messageCount max="-1" min="-1"/>
            </completeCondition>
            <onComplete enclosingElementProperty="Result" expression="//result">
                <respond/>
            </onComplete>
        </aggregate>

When i try to invoke the service using postman, it shows timeout error. "Could not get any response".

All I need is to consolidate the data from Iterator and project back to the end user. If you have any lead or idea on this, please drop a comment.

Can you provide Sample Request XML? From your code i can analyse that in the XML there are multiple occurrences of element "sfdc:iterator" and this you are passing in iterator which means that if there are 5 elements then the message will be split into 5 and then sent to salesforce.But may i know the reason of using payload mediator? Is it possible to remove the payload mediator and execute the request. Upon that as you have made this sequential so it's good practice to log so that you can analyse where the fault is happening

最终如何完成?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM