嗨,我是 mule 新手,第一次开发 mule 项目,请帮助我。在我的主要流程中,我设置了捕获原始有效负载的变量,顺便说一下,如果服务关闭或必须重试 3 次(一直使用到成功),我必须调用一项服务。当它用尽时,它必须通过第二流。无论失败是什么,它都应该只将原始有效负载记录到第二个流中的队列中。所以我试图在 setpayload 处理器中访问 flowVars。但是我收到了类似的错误 - [错误:无法访问:originalPayload;在类中:org.mule.el.context.MessagePropertyMapContext] [Near : {... flowVars.originalPayload ....}] 。请找到我的 xml 配置
<spring:beans>
<spring:bean id="objectStore" class="org.mule.util.store.SimpleMemoryObjectStore"></spring:bean>
</spring:beans>
<vm:endpoint exchange-pattern="one-way" path="path" name="VM" doc:name="VM"></vm:endpoint>
<flow name="Flow1" doc:name="Flow1">
<file:inbound-endpoint path="C:\Users\Star Jothi\Desktop\Mule\FilePath1" responseTimeout="10000" doc:name="File"/>
<byte-array-to-string-transformer doc:name="Byte Array to String"></byte-array-to-string-transformer>
<set-variable variableName="originalPayload" value="#[payload]" doc:name="Variable"/>
<set-payload value="#['hi']" doc:name="Set Payload"/>
<flow-ref name="Flow2" doc:name="Flow Reference"/>
</flow>
<flow name="Flow2" doc:name="Flow2">
<cxf:proxy-client payload="body" enableMuleSoapHeaders="true" doc:name="SOAP"/>
<until-successful objectStore-ref="objectStore" maxRetries="2" secondsBetweenRetries="2" deadLetterQueue-ref="VM" doc:name="Until Successful">
<http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="test" method="POST" doc:name="HTTP"/>
</until-successful>
</flow>
<flow name="Flow3" doc:name="Flow3">
<vm:inbound-endpoint exchange-pattern="one-way" path="path" doc:name="VM"></vm:inbound-endpoint> -->
<set-payload value="#[flowVars.originalPayload]" doc:name="Set Payload"></set-payload>
<logger message="****#[payload]******" level="INFO" doc:name="Logger"></logger>
</flow>
请建议我在使用成功处理器之前如何访问 flowVars 并获取原始有效负载。