2 つの outbound-channel-adapters がフックされたチャネルがあり、どちらもアクティビティの結果を含む Message オブジェクトを返します。これは、SI 2.1 へのアップグレードが行われるまで機能していました。現在、メソッドが null 以外の値を返しているという事実により、エラー メッセージが表示されます。
コードサンプルは次のとおりです。
<integration:gateway id="notificationGateway"
default-request-channel="notificationRecordsFetcher"
default-reply-channel="notifySupplier"
service-interface="com.supplier.NotificationGateway"/>
<!-- Submit the file to the supplier-->
<integration:channel id="notifySupplier"/>
<!-- Handle the secured transfer (first) -->
<integration:outbound-channel-adapter order="1" channel="notifySupplier" id="SupplierSecuredFileTransfer" ref="SubmitToSupplier" method="submit" />
<!-- Delete the notification records marked as successful (second) -->
<integration:outbound-channel-adapter order="2" channel="notifySupplier" id="deleteNotificationRecords" ref="databaseService" method="removeNotificationEntries" />
「SupplierSecuredFileTransfer」として識別されるアダプターは、一連の XML ファイルを受け取り、それぞれがデータベース レコードを表し、SFTP を使用して宛先フォルダーに送信します。次に、正常に配信されたレコードをマークし、「deleteNotificationRecords」として識別される 2 番目のアダプターへの応答として送信します。2 番目のアダプターは、最初のアダプターによって更新されたメッセージ ペイロードを読み取り、それに対して実行します。新しい制限が導入されてから、アダプター間で情報を渡すことができなくなりました。これを克服する方法はありますか?