You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bartosz Popiela (Jira)" <ji...@apache.org> on 2023/05/12 13:55:00 UTC

[jira] [Created] (CAMEL-19343) Predicates are shared between templated routes

Bartosz Popiela created CAMEL-19343:
---------------------------------------

             Summary: Predicates are shared between templated routes
                 Key: CAMEL-19343
                 URL: https://issues.apache.org/jira/browse/CAMEL-19343
             Project: Camel
          Issue Type: Bug
          Components: camel-core-model
    Affects Versions: 3.20.4
            Reporter: Bartosz Popiela


Templated routes with the "choice" processor share the same Predicate and because it is initialized with template parameters of the first route created, it fails for the other routes.
This is particularly visible when using Kamelets.

The proposed solution would be for _org.apache.camel.model.WhenDefinition_ to accept Supplier<Predicate> (or similar) instead of the Predicate instance but that would require static factory methods in _org.apache.camel.support.builder.PredicateBuilder_ to be refactored or a new class to be created.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)