0

I'm trying to manually translate a program from Mule 3 to Mule 4, and a lot of the transforms have something like

<dw:input-variable doc:sample="sample_data\json_63.json" variableName="dsRespPayloads"/>

I don't know what the equivalent is in Mule 4 or if there is one. This is leading me to a problem where a flow defines a variable calls another flow, and in that second flow it tries to transform the message using the variable defined in the first.

In Mule 4 it keeps saying Property: dsRespPayloads was not found.

and it's giving me errors over it. Also the tree on the left just says Unknown for Payload and Attributes

Any help or explanation about what's going on would be appreciated.

2 Answers2

0

Are you saying you define a variable in flowOne and in the flowTwo, you calls this variable something like that ???

<flow name="flow1" doc:id="29ba6da8-7458-4f35-adff-1d9db5738fbc" >
   <set-variable value="Hello" doc:name="Set Variable" doc:id="055abd42-b240-4113-b08d-dde00b8ea590" variableName="dsRespPayloads"/>
 </flow>

<flow name="dataweaveLabFlowTwo" doc:id="ae122a1a-b9d0-490d-a7e4-2c138e5d4c01" >
 <logger level="INFO" doc:name="Logger" doc:id="e4f4bf3a-29f9-4d4e-b2c9-d4a86bd2eb29"  message='#[" $(vars.dsRespPayloads)"]' />
</flow>
Alan M
  • 616
  • 5
  • 15
0

In Mule 4 you can not set the mime types for inputs at the transformer level. You need to set them in the connector where they are generated, in set-payload or set-variable, before they reach the transformer.

Example:

<set-variable variableName="x" value='{"a":"b", "c":1}' mimeType="application/json" doc:name="Set Variable" />
aled
  • 21,330
  • 3
  • 27
  • 34