This is an automated email from the ASF dual-hosted git repository.
oscerd pushed a commit to branch 4.22.x
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/4.22.x by this push:
new d6a85a656 Fix #930: salesforce-delete/update-sink: use
CamelSalesforceSObjectId and canonical YAML DSL (#3078)
d6a85a656 is described below
commit d6a85a656049bbc84c625737f212942137b481b6
Author: Salvatore Mongiardo <[email protected]>
AuthorDate: Fri Oct 2 09:02:26 2026 +0200
Fix #930: salesforce-delete/update-sink: use CamelSalesforceSObjectId and
canonical YAML DSL (#3078)
Two bugs fixed in both salesforce sink kamelets:
1. Wrong header name: CamelSalesforceId → CamelSalesforceSObjectId
SalesforceEndpointConfig.SOBJECT_ID = "CamelSalesforceSObjectId", so the
component's AbstractRestProcessor.determineSObjectId() looks for that
header.
Using CamelSalesforceId leaves it unset, causing:
- salesforce-delete-sink: "Missing property CamelSalesforceSObjectId"
- salesforce-update-sink: URISyntaxException — the full JSON body is
appended to the URL as the record ID instead of the sObject ID
2. Compact YAML DSL notation deprecated since Camel 4.4:
The shorthand form setHeader.jsonpath / transform.jsonpath silently fails
to wire the expression at runtime. Converted to canonical form:
- setHeader:
name: CamelSalesforceSObjectId
expression:
jsonpath:
expression: "$.sObjectId"
Same for the transform step in salesforce-update-sink.
Also corrected the removeHeader names in salesforce-update-sink from the
raw field names (sObjectId / sObjectName) to the actual Camel header names
(CamelSalesforceSObjectId / CamelSalesforceSObjectName).
Co-authored-by: Claude Sonnet 4.6 (1M context) <[email protected]>
---
kamelets/salesforce-delete-sink.kamelet.yaml | 12 ++++++++----
kamelets/salesforce-update-sink.kamelet.yaml | 18 ++++++++++++------
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/kamelets/salesforce-delete-sink.kamelet.yaml
b/kamelets/salesforce-delete-sink.kamelet.yaml
index 2cecb4bc5..d329fce7f 100644
--- a/kamelets/salesforce-delete-sink.kamelet.yaml
+++ b/kamelets/salesforce-delete-sink.kamelet.yaml
@@ -99,16 +99,20 @@ spec:
uri: kamelet:source
steps:
- setHeader:
- name: CamelSalesforceId
- jsonpath: "$['sObjectId']"
+ name: CamelSalesforceSObjectId
+ expression:
+ jsonpath:
+ expression: "$['sObjectId']"
- setHeader:
name: CamelSalesforceSObjectName
- jsonpath: "$['sObjectName']"
+ expression:
+ jsonpath:
+ expression: "$['sObjectName']"
- setBody:
simple: "${null}"
- to:
uri: "{{local-delete-salesforce}}:deleteSObject"
- removeHeader:
- name: CamelSalesforceId
+ name: CamelSalesforceSObjectId
- removeHeader:
name: CamelSalesforceSObjectName
diff --git a/kamelets/salesforce-update-sink.kamelet.yaml
b/kamelets/salesforce-update-sink.kamelet.yaml
index d3841e1d5..15117236b 100644
--- a/kamelets/salesforce-update-sink.kamelet.yaml
+++ b/kamelets/salesforce-update-sink.kamelet.yaml
@@ -93,13 +93,19 @@ spec:
uri: kamelet:source
steps:
- setHeader:
- name: CamelSalesforceId
- jsonpath: "$.sObjectId"
+ name: CamelSalesforceSObjectId
+ expression:
+ jsonpath:
+ expression: "$.sObjectId"
- setHeader:
name: CamelSalesforceSObjectName
- jsonpath: "$.sObjectName"
+ expression:
+ jsonpath:
+ expression: "$.sObjectName"
- transform:
- jsonpath: "$.payload"
+ expression:
+ jsonpath:
+ expression: "$.payload"
- marshal:
json: {}
- to:
@@ -107,6 +113,6 @@ spec:
parameters:
rawPayload: "true"
- removeHeader:
- name: sObjectId
+ name: CamelSalesforceSObjectId
- removeHeader:
- name: sObjectName
+ name: CamelSalesforceSObjectName