Skip to main content
Scott Nieman a posé une question dans #Payload As String

This is happening on a filter, with or without 'as String' on vars.shipmentId. I used as String to cast the variable to a string. $.ShipmentNumber is also a string.

 

<ee:set-payload><![CDATA[%dw 2.0

output application/json

---

{

shippedItemInstance: 

vars.ceresShipmentCSV filter $.ShipmentNumber == vars.shipmentId as String

map ( payload01 , indexOfPayload01 ) -> {

identifier: {

content: payload01.ShipmentNumber ++ "-" ++ payload01.SeqCode,

typeCode: "lineNumber"

},

 

vars.shipmentId is being set properly from a for each, as shown in the logs just prior to the DataWeave transform.

 

INFO 2021-03-17 14:52:13,416 [[MuleRuntime].uber.04: [generateshippediteminstancelistfromcsv].generateshippediteminstancelistfromcsvFlow.CPU_INTENSIVE @29c16a4b] [processor: generateshippediteminstancelistfromcsvFlow/processors/3/processors/1; event: 44a93b80-875a-11eb-b39d-e06995d27ef9] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: shipmentId is = 6683386 variable = 6683386

 

I have seen other unanswered Value Selector related forum posts.

5 réponses
0/9000