Skip to content

Commit

Permalink
👌 IMPROVE: Update Salesforce connector
Browse files Browse the repository at this point in the history
  • Loading branch information
jpontdia committed Oct 20, 2023
1 parent d1218a2 commit 3fd251a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 20 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Shared Mule library that provides reusable flows, resources and configuration se
## Table of contents
1. [Description](#description)
1. [Configuration](#configuration)
1. [Salesforce](#salesforce)
1. [JWT configuration](#salesforce-jwt-configuration)
2. [Connector configuration](#salesforce-connector-configuration)

## Description

Expand All @@ -32,16 +34,24 @@ Multiple common components like flows, sub-flows, etc. to be re-used across the

In summary, having a project with common assets like flows, configurations, and other reusable components brings numerous benefits, including reusability, consistency, efficiency, maintainability, scalability, and collaboration. It empowers developers to build integration solutions more effectively, accelerates development cycles, and ensures high-quality and reliable outcomes.

## Configuration
## Salesforce

### Salesforce JWT configuration
Find the instrucctions in the Development Process Document in Anypoint Exchange.

### Salesforce connector configuration

The next properties must be provided to run the service:

| Property | Description |
| ------------------------- | ------------------------- |
| salesforce.keystore | Keystore with cetificates to connect with Salesforce. Salesforce JWT Authentication |
| salesforce.consumerkey | Salesforce Consumer Key |
| salesforce.principal | Salesforce User |
| salesforce.storepassword | Password for the keystore |
| salesforce.keystore | Keystore with the cetificate to connect with Salesforce. |
| salesforce.consumerkey | Connected App Consumer Key |
| salesforce.principal | The user created in Salesforce that has the profile assigned to the Connected App |
| salesforce.storepassword | The password to open the keystore |
| salesforce.certificatealias | The alias of the certificate inside the keystore |
| salesforce.tokenendpoint | The URL to generate the authentication token |
| salesforce.audienceurl | test.salesforce.com for a sandbox environment and login.salesforce.com for production. |

<br>

Expand Down
12 changes: 5 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<parent>
<groupId>078efef1-d139-48ed-92f5-f8d4a0592374</groupId>
<artifactId>common-parent-pom</artifactId>
<version>1.0.5</version>
<version>1.0.14</version>
<relativePath/>
</parent>

<groupId>078efef1-d139-48ed-92f5-f8d4a0592374</groupId>
<artifactId>common-core</artifactId>
<version>1.0.12</version>
<version>1.0.13</version>
<packaging>mule-application</packaging>
<name>common-core</name>
<description>Shared Mule library that provides reusable flows, resources and configuration settings common for all applications</description>
Expand All @@ -29,9 +29,9 @@
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<classifier>mule-plugin</classifier>
</configuration>
<configuration>
<classifier>mule-application</classifier>
</configuration>
</plugin>
</plugins>
</build>
Expand All @@ -50,9 +50,7 @@
<artifactId>mule-otel-connector</artifactId>
<classifier>mule-plugin</classifier>
</dependency>

</dependencies>

<!--Repository to get the artifacts for your Anypoint organization -->
<repositories>
<repository>
Expand Down
2 changes: 1 addition & 1 deletion src/main/mule/global-configuration-salesforce.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
consumerKey="${salesforce.consumerkey}"
keyStore="${salesforce.keystore}"
storePassword="${salesforce.storepassword}"
principal="${salesforce.principal}" />
principal="${salesforce.principal}" certificateAlias="${salesforce.certificatealias}" tokenEndpoint="${salesforce.tokenendpoint}" audienceUrl="${salesforce.audienceurl}"/>
</salesforce:sfdc-config>

</mule>
13 changes: 7 additions & 6 deletions src/main/resources/global-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ salesforce:
consumerkey: "my-consumer-key"
keystore: "my-keystore.jks"
storepassword: "the-kystore-password"
principal: "user-in-salesforce"
certificatealias: "the-certificate-inside-keystore"
principal: "user-in-salesforce"
tokenendpoint: "salesforce-token-endpoint"
audienceurl: "https://test.salesforce.com-(sandbox)"

#OpenTelemtry configuration
# OpenTelemtry configuration
otel:
collectorendpoint: "http://localhost:4317"
servicename: "myservice"

#Service messages
# Service messages
messages:
backend-error: "There was a problem while trying to access the backend repository"
apikit-400: "Bad request"
Expand All @@ -22,9 +25,7 @@ messages:
apikit-406: "Not acceptable"
apikit-415: "Unsupported media type"
apikit-501: "Not Implemented"



# Logging - logz.io
# Add the jar files in the service pom
logzio.token: "MyToken"
logzio.url: "MyUrl"

0 comments on commit 3fd251a

Please sign in to comment.