我使用骡子 3.3.1 CE。
当消息有效负载为 SUCCESS 字符串时,我有一个从备份目录读取 *.json 文件的场景。
这是我的骡子配置:
<flow>
...
<flow-ref name="auditTrailFlow"/>
<flow-ref name="auditTrailBackupFlow"/>
</flow>
<sub-flow name="auditTrailBackupFlow">
/// returns SUCCESS
</sub-flow>
<sub-flow name="auditTrailBackupFlow">
<description>
Resending backup AuditTrail JSON's objects to db
</description>
<choice>
<when expression="#[message.payload == SUCCESS]">
<logger level="INFO" message="Checking audittrail backup directory"/>
<file:inbound-endpoint connector-ref="in" path="${audittrail.backup.dir}">
<file:filename-wildcard-filter pattern="*.json" caseSensitive="true" />
</file:inbound-endpoint>
<not-filter>
<filter ref="nullPayloadFilter"/>
</not-filter>
<json:json-to-object-transformer targetClass="com.company.AuditTrail"/>
// updates db
</when>
<otherwise>
// do something
</otherwise>
</choice>
</sub-flow>
当应用程序部署在服务器中时出现以下错误
Invalid content was found starting with element 'file:inbound-endpoint'.
根据错误,我了解 file:inbound-endpoint 位于错误的位置。
我的问题是,一旦 mule 消息有效负载成功,我如何告诉 mule 文件传输读取文件。