Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3815

Allow for non-void method calls in outbound channel adapter expression

    XMLWordPrintable

    Details

      Description

      Right now, the SpEL expression I specify on an <int:outbound-channel-adapter> requires a void-returning expression, otherwise an exception is thrown.
      However, this is limiting. What if I just want to call a method and ignore its return value?

      In my case, I have a flow that ends in an outbound adapter that should just delete a temporary file. However File.delete() returns a boolean value, which I'm not interested in. Hence, an expression like payload.file.delete() throws a ConversionNotSupportedException, so now I have to wrap that expression into a ad-hoc service method call.

      Is there a strong reason for requiring a void returning expression?

        Attachments

          Activity

            People

            Assignee:
            grussell Gary Russell
            Reporter:
            mauromol Mauro Molinari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: