Я пытаюсь прочитать файл IDO C, используя соединитель файлов, и преобразовывая его в структуру ответа EDIFACT, соединитель записи EDIFACT запишет данные в виде файла ответов EDIFACT и получит ошибку enter code here
Сообщение: java .lang.ClassCastException: java .util.LinkedHashMap нельзя преобразовать в java .util.List. Тип ошибки: EDIFACT: UNKNOWN Элемент: Copy_of_flat-file-xmlFlow / processors / 2 @ ido-edi-response: ido-edi-response. xml: 157 (Write) Элемент XML:
<edifact:config name="EDIFACT_EDI_Config" doc:name="EDIFACT EDI Config" doc:id="c9bc5482-7763-4749-9e11-d600bf8729fb" >
<edifact:schemas >
<edifact:schema value="/edifact/d97a/ORDRSP.esl" />
</edifact:schemas>
</edifact:config>
<edifact:config name="EDIFACT_EDI_Config1" doc:name="EDIFACT EDI Config" doc:id="cd3c07c2-ff42-4fcd-876e-3ef46a8700fe" >
<edifact:schemas >
<edifact:schema value="/edifact/d97a/ORDRSP.esl" />
</edifact:schemas>
</edifact:config>
<file:config name="File_Config" doc:name="File Config" doc:id="f401b616-0042-4523-9814-91b194f4951e" >
<file:connection workingDir="D:\Study Materials\Mule4\outputEDI" />
</file:config>
<file:config name="File_Config1" doc:name="File Config" doc:id="6a7f125c-74c1-4f2c-a13a-8033e9234b72" >
<file:connection workingDir="D:\Study Materials\Mule4\outputEDI\InputFile" />
</file:config>
<file:config name="File_Config2" doc:name="File Config" doc:id="78b849a7-144f-46ff-a8fd-c649a9d36d08" >
<file:connection workingDir="D:\Study Materials\Mule4\outputEDI\OutputFile" />
</file:config>
<flow name="Copy_of_flat-file-xmlFlow" doc:id="a95a80fa-0dd6-42d3-bf82-250b9ba417ae" >
<file:listener doc:name="On New or Updated File" doc:id="829c330e-5dbb-4a6c-8b74-c8ed1824f8d9" config-ref="File_Config1" moveToDirectory="D:\Mule4Poc\Proccessed_Files\ResponseFiles">
<scheduling-strategy >
<fixed-frequency frequency="10" startDelay="10" timeUnit="SECONDS"/>
</scheduling-strategy>
</file:listener>
<ee:transform doc:name="Transform Message" doc:id="d500e3f3-cda5-4bf3-95d3-b15ffb35bff8" >
<ee:message >
<ee:set-payload ><![CDATA[%dw 2.0
output application/java
---
{
Delimiters: ":+.? ",
Messages: {
D97A: {
ORDRSP: {
Interchange: {
UNB0101: "UNOC",
UNB0102: "1",
UNB0201: "FSCEDI",
UNB0202: "ZZ",
UNB0301: "4005922028008",
UNB0302: "14",
UNB0401: "200120",
UNB0402: "0639",
UNB05: "68895",
UNB07: "ORDRSP",
UNB11: "1" as Number default 0
},
MessageHeader: {
UNH01: "600222795",
UNH0201: "ORDRSP",
UNH0202: "D",
UNH0203: "97A",
UNH0204: "UN"
},
Heading: {
"0020_BGM": {
BGM0101: "231",
BGM0201: payload.ORDERS01.IDOC.*E1EDK02[0].BELNR
},
"0030_DTM": {
DTM0101: "5",
DTM0102: payload.ORDERS01.IDOC.*E1EDK03[0].DATUM
},
"0140_Segment_group_3": [{
"0180_Segment_group_4": {
"0190_RFF": {
RFF0102: payload.ORDERS01.IDOC.*E1EDK02[0].DATUM
}
},
(payload.ORDERS01.IDOC.*E1EDKA1 map {
"0150_NAD": {
NAD01: if($.PARVW == "AG") ("BY") else (if($.PARVW == "LF") ("SU") else (if($.PARVW == "WE") ("UC") else (if($.PARVW == "RE") ("RE") else ("BT")))),
NAD0201: $.PARTN as String,
NAD0203: "91",
NAD0401: $.NAME1,
NAD0402: $.NAME2,
NAD0403: $.NAME3,
NAD0501: $.STRAS as String,
NAD06: $.ORT01,
NAD08: $.PSTLZ as String,
NAD09: $.LAND1,
}
}),
"0240_Segment_group_6": [{
"0260_COM": (payload.ORDERS01.IDOC.*E1EDKA1 map {
COM0101: if($.SPRAS == "E")($.TELBX) else ($.TELF1),
COM0102: ""
}),
"0250_CTA": {
CTA01: "SU",
CTA0202: payload.ORDERS01.IDOC.*E1EDKA1[1].BNAME
}
}]
}],
"0310_Segment_group_8": [{
"0320_CUX": {
CUX0101: "2",
CUX0102: payload.ORDERS01.IDOC.E1EDK01.CURCY,
CUX0103: "9"
}
}]
},
Detail: {
"0960_Segment_group_26": [{
"0970_LIN": {
LIN01: payload.ORDERS01.IDOC.E1EDP01.POSEX as String,
LIN02: "5",
LIN0301: payload.ORDERS01.IDOC.E1EDP01.*E1EDP19[0].IDTNR,
LIN0303: "VP"
},
"0980_PIA": [{
PIA01: "1",
PIA0201: payload.ORDERS01.IDOC.E1EDP01.*E1EDP19[1].IDTNR,
PIA0202: "BP",
PIA0301: payload.ORDERS01.IDOC.E1EDP01.*E1EDP19[2].IDTNR,
PIA0302: "EN",
PIA0304: "9"
}],
"1010_QTY": [{
QTY0101: "113",
QTY0102: payload.ORDERS01.IDOC.E1EDP01.MENGE,
QTY0103: payload.ORDERS01.IDOC.E1EDP01.MENEE
}],
"1240_Segment_group_30": [{
"1250_PRI": {
PRI0101: "CAL",
PRI0102: payload.ORDERS01.IDOC.E1EDP01.NETWR,
PRI0106: payload.ORDERS01.IDOC.E1EDP01.PMENE
}
}],
"1300_Segment_group_31": [{
"1310_RFF": {
REF0101: "LI",
RFF0102: payload.ORDERS01.IDOC.E1EDP01.E1EDP02.ZEILE as String
}
}]
}]
}
}
}
}
}]]></ee:set-payload>
</ee:message>
</ee:transform>
<logger level="INFO" doc:name="Logger" doc:id="fd528241-ed6c-4aca-ad80-10a5b816f86d" message="#[payload]"/>
<edifact:write doc:name="Write" doc:id="cec274ce-2694-40bb-8855-ae8d78dc7bd5" config-ref="EDIFACT_EDI_Config1">
</edifact:write>
<file:write doc:name="Write" doc:id="97fc2aed-9031-4b1e-ba2c-1dbc8ff098f1" config-ref="File_Config2" path="Orders.edi"/>
<logger level="INFO" doc:name="Logger" doc:id="c7f68826-faac-450a-94bc-1ca46de62127" message="#[payload]"/>
</flow>
Теперь получаем информацию 2020-02-10 17: 48: 53,875 [[MuleRuntime] .cpuIntensive.07: [ido-edi-response] .Copy_of_flat-file-xmlFlow.CPU_INTENSIVE @ 65c53e88] [событие: 80a06380-4bff-11ea -b8a0-901b0e902903] com.mulesoft.flatfile.lexical.edifact.EdifactWriter: Восстанавливаемая ошибка записи, несовместимый тип для предоставленного объекта значения: java .lang.String ОШИБКА 2020-02-10 17: 48: 53,896 [[MuleRuntime]. cpuIntensive.07: [id-edi-response] 1007 *
Сообщение: ошибка операции записи. Тип ошибки: EDIFACT: Элемент WRITE: Copy_of_flat-file-xmlFlow / processors / 3 @ ido-edi-response: ido-edi-response. xml: 165 (запись) Элемент XML: