WSO2迭代中介器不维持顺序,即使顺序=“ true”

问题描述 投票:1回答:1

我有类似的场景,

  1. 读取包含附件(即图像)的未读gmail
  2. 为了遍历附件,我在WSO2 EI中使用了Iterate Mediator
  3. 将那些图像附件插入到Salesforce文件对象中。

处理正常。我的问题是迭代介体不会保持附件在电子邮件正文中的显示顺序,即使设置了顺序=“ true”

<iterate continueParent="true" description="MailIterator" expression="//parts" id="listUnread" sequential="true">
    <target>
        <sequence>
            <property expression="//filename/text()" name="AttachedFileName" scope="default" type="STRING"/>
            <property expression="substring-after(get-property('AttachedFileName'),'.')" name="Attachmentextension" scope="default" type="STRING"/>
            <filter description="check emailSubject" regex="jpg|jpeg|png|gif|webp|tiff|tif|psd|raw|bmp|dib|heif|heic|indd|ind|jp2" source="get-property('Attachmentextension')">
                <then>
                    <property description="emailAttachmentId" expression="//attachmentId/text()" name="uri.var.attachmentId" scope="default" type="STRING"/>
                    <log level="custom">
                        <property expression="get-property('AttachedFileName')" name="=====ValidAttachmentFileName===="/>
                        <property expression="get-property('uri.var.attachmentId')" name="====emailAttachmentId====="/>
                    </log>
                     <!-- Salesforce file object insert process done here  -->
                </then>
                <else>
                    <log level="custom">
                        <property expression="fn:concat('Image format. FileName is:',get-property('AttachedFileName'))" name="===Invalid"/>
                    </log>
                </else>
            </filter>
        </sequence>
    </target>
</iterate>

它以不同于电子邮件正文附件顺序的其他顺序处理所有附件。请任何人澄清这一点。预先感谢。

iterator wso2esb
1个回答
0
投票

使用带有选项blocking =“ true”的呼叫介体来执行同步呼叫

© www.soinside.com 2019 - 2024. All rights reserved.