You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/09/14 19:17:00 UTC
[jira] [Commented] (CAMEL-24714) camel-core-model - complete the @AsPredicate marking of expression properties and have tooling read asPredicate from the catalog instead of hardcoded lists
[ https://issues.apache.org/jira/browse/CAMEL-24714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115289#comment-18115289 ]
Claus Ibsen commented on CAMEL-24714:
-------------------------------------
Merged in https://github.com/apache/camel/pull/26399
_Claude Code on behalf of davsclaus_
> camel-core-model - complete the @AsPredicate marking of expression properties and have tooling read asPredicate from the catalog instead of hardcoded lists
> -----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24714
> URL: https://issues.apache.org/jira/browse/CAMEL-24714
> Project: Camel
> Issue Type: Improvement
> Components: camel-catalog, camel-core
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.23.0
>
>
> Since CAMEL-10698 the model marks the expression properties the reifier evaluates as predicates with @AsPredicate (filter, when, onWhen, validate, choice/when, aggregate completionPredicate, the onWhen/handled/continued/retryWhile of onException and onCompletion, catch, intercept, interceptFrom, interceptSendToEndpoint), the package plugin writes it as "asPredicate": true next to "kind": "expression" in the catalog models/*.json, and JsonMapper reads it back into EipOptionModel.isAsPredicate(). Nothing else reads it though: the tooling that needs to know whether a simple: value is a predicate or an expression keeps its own list.
> What is left:
> * Marking gaps: PredicateValidatorDefinition.expression is reified with createPredicate but is not annotated (predicateValidator.json has no asPredicate). LoopDefinition.expression is a predicate only when doWhile=true; a per-property flag cannot say that, so it stays unmarked and the consumers special-case doWhile (say so in the @AsPredicate javadoc).
> * Consumers read the catalog: SimpleChecks.PREDICATE_EIPS in camel-jbang-core (the write-time Simple check of SourceValidator, CAMEL-24698) is replaced by a lookup of the parent EIP's expression option in the catalog (kind=expression and asPredicate); the loopDoWhile/loop-do-while entries are dead (the YAML key is loop with doWhile: true) and go. camel_catalog_sample the same, if it needs the distinction.
> * A test that the properties with asPredicate=true in the catalog are exactly the ones the reifier evaluates with createPredicate, so the annotation and the runtime cannot drift apart.
> The JSON key stays asPredicate (published in the catalog since 2017); no new @Metadata attribute.
> Discussed with Claus on 2026-09-13 while reviewing PR 26379.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)