Mule ConsumerIterator错误为LinkedHashMap

Mule ConsumerIterator错误为LinkedHashMap,mule,Mule,我有一个查询SalesForce的流程。查询被包装在一个enricher中。这里是流程图 <flow name="ProcessEmployee"> <enricher doc:name="Message Enricher" target="# [variable:IDRec]"> <sfdc:query co

我有一个查询SalesForce的流程。查询被包装在一个enricher中。这里是流程图

     <flow name="ProcessEmployee"> 
            <enricher doc:name="Message Enricher" target="#
                                             [variable:IDRec]">
                <sfdc:query config-ref="Salesforce_Config"
                    doc:name="Check if Employee Id exists"

          query="select id from employee where

          deptId='#[payload[&quot;deptId&quot;]]'   &amp;&amp; 
                       empId='#[payload[&quot;empId&quot;]]'" />
            </enricher>
            <choice>
                <when expression="#[flowVars.IDRec.hasNext()]">
                    <logger level="INFO"
                        message="Employee exists, #[payload]" />
                </when>
                <otherwise>
                   <logger level="INFO" message="Employee does not exist"/>
                </otherwise>
            </choice>
         </flow>

返回的值是一个映射。你可以试试这个方法

<choice>
    <when expression="#[flowVars.IDRec.size() > 0]">
        <logger level="INFO" message="Employee exists, #[payload]" />
    </when>
    <otherwise>
        <logger level="INFO" message="Employee does not exist"/>
    </otherwise>
</choice>

<choice>
    <when expression="#[flowVars.IDRec.size() > 0]">
        <logger level="INFO" message="Employee exists, #[payload]" />
    </when>
    <otherwise>
        <logger level="INFO" message="Employee does not exist"/>
    </otherwise>
</choice>