Hi I have a simple question about the Predicates I got a systemConfig object, which has 2 getters/setters. The systemConfig object is set as an exchange property.
When I use a the simple function, that works! from("direct:testPredicates") .to("direct:getSystemConfig") .choice() .when(simple("${exchangeProperty.systemConfig.isActive} == false || ${exchangeProperty.systemConfig.isEnabled} == false")) .log("System is active and System is enabled") .otherwise() .log("System is not active or MLSSync is disabled") .end(); When I try to use Predicates, then I thought this should work like this: Before the route: Predicate isSystemActive = exchangeProperty("systemConfig.isActive").isEqualTo(true); Predicate isSystemEnabled = exchangeProperty("systemConfig.isEnabled").isEqualTo(false); Inside the route: from("direct:testPredicates") .to("direct:getSystemConfig") .choice() .when(and(isSystemActive, isSystemEnabled)) .log("System is active and System is enabled") .otherwise() .log("System is not active or MLSSync is disabled") .end(); I am using Camel 3.18.2