Announcement Announcement Module
Collapse
No announcement yet.
to determine success or a failure in a sftp channel Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • to determine success or a failure in a sftp channel

    Hi,

    I would like to know how a success or failure can be achieved in the sftp outbound adapter.

    Thanks

  • #2
    A number of options, including...

    A.

    1. Make the channel the adapter subscribe to a <publish-subscribe-channel />
    2. Add an order attribute to the adapter (="1")
    3. Add another endpoint (e.g. <service-activator/>) as a subscriber to the same channel, with order="2".

    The second endpoint will only be called if the sftp operation is successful.

    B.

    1. Add an error-channel to the flow's inbound endpoint.
    2. If the sftp operation fails, an ErrorMessage will be sent to the error-channel. If no ErrorMessag, the operation was successful.

    C.

    Both A. and B.

    Comment


    • #3
      Thanks Gary.I will try the second option.

      Comment


      • #4
        Are there any samples to configure the error channel?
        I would appreciate any help.

        Thanks

        Comment


        • #5
          Oleg's SpringOne demo is one...

          https://github.com/olegz/s12gx.2011/...egration/error

          Here's another... https://github.com/SpringSource/spri...mo-context.xml

          Basically, you put an error-channel on the inbound endpoint and it gets an ErrorMessage who's payload is a MessagingException; this has two important properties cause (the exception) and failedMessage (the message that failed).

          Comment

          Working...
          X