我有这个Mule流程:
<file:connector name="input" doc:name="input" autoDelete="false" />
<flow name="flow1">
<file:inbound-endpoint connector-ref="input" responseTimeout="10000" doc:name="input" path="C:\test" pollingFrequency="100000" />
<file:filename-wildcard-filter pattern="prod.xml" />
<set-variable variableName="tempid" value="150" doc:name="Variable" />
<foreach doc:name="For Each" collection="#[xpath3('//marketingdetailslist/marketdetails/*', payload, 'NODESET' )]">
<enricher source="#[flowVars.tempid]" target="#[xpath3('//marketdetails/target')]" >
<logger message="inside enricher ~~~~~#[message.payloadAs(java.lang.String)]" level="INFO" doc:name="Logger"/>
</enricher>
</foreach>
<logger message="after enrichment response~~~~~~.......#[message.payloadAs(java.lang.String)]" level="INFO" doc:name="Logger"/>
</flow>
它接收此XML作为输入:
<marketingdetailslist>
<marketdetails>
<Jan>
<target>100</target>
<productname>Electronics</productname>
</Jan>
<Feb>
<target>50</target>
<productname>Woodenitems</productname>
</Feb>
</marketdetails>
</marketingdetailslist>
这将是预期的输出,值会发生变化:
<marketingdetailslist>
<marketdetails>
<Jan>
<target>150</target>
<productname>Electronics</productname>
</Jan>
<Feb>
<target>150</target>
<productname>Woodenitems</productname>
</Feb>
</marketdetails>
</marketingdetailslist>
我无法获得预期的输出。为了实现这一目标,我需要改变哪些内容?