Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-624

The camel aggregation example generates an error whenever the completion predicate is entered.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.8.0-fuse-00-06, 2.8.0-fuse-00-08, 2.8.0-fuse-01-06, 2.8.0-fuse-01-11, 2.8.0-fuse-01-20, 2.8.0-fuse-02-02, 2.8.0-fuse-03-06, 2.8.0-fuse-05-03, 2.9.0-fuse-00-00
    • None
    • None

    Description

      The camel aggregate example will generate an error every time that someone uses the completion predicate 'STOP'.

      The problem is that prior to v2.8, the base convertor mechanism would return null if we are not able to convert the body to the desired type.
      While from v2.8 onwards, this condition now generates an exception instead.

      The example expects an Integer as a body but uses the string 'STOP' as a completion predicate.

      There are two solutions that I was considering and would like your input.

      Solution 1: Update the NumberAggregatorStrategy class in the aggregate example to return an Object instead of an Integer for the newExchange or surround the call with a try/catch/

      Solution 2: Update the AggregateProcessor class so that the onAggregate method is called for the two exchanges iff the complete variable is not equal to 'predicate'.

      Note that considering solution 2 would mean that the aggregate tests that depend on the completion predicate need to be updated to not assume that the predicate value is part of the aggregated exchange.

      Attachments

        Activity

          People

            cibsen@redhat.com Claus Ibsen
            ccorsi1_jira Claudio Corsi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: