You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/06/09 16:08:40 UTC
[camel-kamelets] 02/06: Added Predicate Filter Action Kamelet
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch predicate-filter
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 5c9ea03c7337064810442e64e23c2552087dd428
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jun 9 17:56:47 2021 +0200
Added Predicate Filter Action Kamelet
---
.../kamelets/predicate-filter-action.kamelet.yaml | 36 ++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/library/camel-kamelets-catalog/src/main/resources/kamelets/predicate-filter-action.kamelet.yaml b/library/camel-kamelets-catalog/src/main/resources/kamelets/predicate-filter-action.kamelet.yaml
new file mode 100644
index 0000000..6af19bb
--- /dev/null
+++ b/library/camel-kamelets-catalog/src/main/resources/kamelets/predicate-filter-action.kamelet.yaml
@@ -0,0 +1,36 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: predicate-filter-action
+ labels:
+ camel.apache.org/kamelet.type: "action"
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "main-SNAPSHOT"
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Actions"
+spec:
+ definition:
+ title: "Predicate Filter Action"
+ description: "Filter based on a JsonPath Expression"
+ required:
+ - expression
+ properties:
+ expression:
+ title: Expression
+ description: The JsonPath Expression to evaluate, without the external parenthesis. Since this is a filter, the expression will be a negation, this means that if the foo field of the example is equals to John, the message will go ahead, otherwise it will be filtered out.
+ type: string
+ example: '@.foo =~ /.*John/'
+ dependencies:
+ - "camel:core"
+ - "camel:kamelet"
+ - "camel:jsonpath"
+ flow:
+ from:
+ uri: kamelet:source
+ steps:
+ - filter:
+ jsonpath: "$[?(!({{expression}}))]"
+ steps:
+ - stop: {}