【发布时间】:2018-11-27 05:41:52
【问题描述】:
我正在尝试从 Netsuite 获取数据并使用 Mulesoft Dataweave 元素以及 When-Otherwise 根据下面的 sn-p 将其保存在 salesforce 对象中,但给了我错误:
找不到将“SimpleDataType{type=java.util.LinkedHashMap, mimeType='/', encoding='null'}”转换为“CollectionDataType{type=java.util”的转换器.List, itemType=java.lang.Object, mimeType='/'}”。
不知道如何将 Map 转换为 List,因为我是 Mulesoft 的新手。 如果我不使用 When-Otherwise,它会给出:
如果来自 Netsuite 的值为 null,则“无法将 :null 强制转换为 :string 错误”。
<dw:transform-message doc:name="Transform Message">
<dw:set-payload><![CDATA[%dw 1.0
%output application/java
---
{
Some_Id__c: payload.customFieldList.customField[0].StringCustomFieldRef__custbody_reference_id as :string when payload.customFieldList.customField[0].StringCustomFieldRef__custbody_reference_id != null otherwise ""
}
]]></dw:set-payload>
</dw:transform-message>
【问题讨论】:
标签: mule