Skip to content

Commit

Permalink
Fix salesforce-update-sink.kamelet
Browse files Browse the repository at this point in the history
Fix apache#1590

At runtime the bean is renamed which seems to cause the
NoSuchEndpointException: No endpoint could be found for: local-salesforce-1
  • Loading branch information
claudio4j committed Jun 14, 2024
1 parent 791443d commit 19ecd26
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions kamelets/salesforce-update-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ spec:
definition:
title: "Salesforce Update Sink"
description: |-
Update an object in Salesforce.
The body received must contain a JSON key-value pair for each property to update inside the payload attribute, for example:
Update an object in Salesforce.
The body received must contain a JSON key-value pair for each property to update inside the payload attribute, for example:
`{ "payload": { "Phone": "1234567890", "Name": "Antonia" } }`
The body received must include the `sObjectName` and `sObjectId` properties, for example:
`{ "payload": { "Phone": "1234567890", "Name": "Antonia" }, "sObjectId": "sObjectId", "sObjectName": "sObjectName" }`
required:
- clientId
- clientSecret
Expand Down Expand Up @@ -101,14 +101,21 @@ spec:
from:
uri: kamelet:source
steps:
- setProperty:
- setHeader:
name: sObjectId
jsonpath: "$['sObjectId']"
- setProperty:
jsonpath: "$.sObjectId"
- setHeader:
name: sObjectName
jsonpath: "$['sObjectName']"
jsonpath: "$.sObjectName"
- transform:
jsonpath: "$['payload']"
jsonpath: "$.payload"
- marshal:
json: {}
- toD: "{{local-salesforce}}:updateSObject?sObjectId=${exchangeProperty.sObjectId}&sObjectName=${exchangeProperty.sObjectName}&rawPayload=true"
- to:
uri: "{{local-salesforce}}:updateSObject"
parameters:
rawPayload: "true"
- removeHeader:
name: sObjectId
- removeHeader:
name: sObjectName

0 comments on commit 19ecd26

Please sign in to comment.