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