FINS Salesforce Topic Listener API - Implementation Template

(0 reviews)

Deployment

Each Accelerator implementation template in Exchange includes Bash and Windows scripts for building and deploying the APIs to CloudHub. These scripts depend on repositories, global settings, deployment profiles, and associated properties configured in the Maven settings.xml file.

Many templates can also be run from Anypoint Studio without having to customize the Run/Debug profiles. However, some templates make use of hidden deployment properties to protect sensitive information (e.g., passwords and secret keys). These properties must be supplied to the runtime by updating the configuration profile and adding them as VM arguments.

Preparation

This application demonstrates how to deploy multiple copies of the same application in the same environment, where each is connected to different back-end system. In this case, each deployment can connect to a separate Salesforce Financial Services Cloud instance.

To begin with, ensure the Maven profile CloudHub-FINS-DEV has been properly configured in your settings.xml file. Now configure at least one additional profile, which contains the Salesforce connection details (e.g.,FSC-Banking-DEV). In the deployment script, ensure both profiles are included in the ENV_PROFILE environment variable, with the FSC profile appearing second. For example:

ENV_PROFILE=CloudHub-FINS-DEV,FSC-Banking-DEV

Required property overrides

At a minimum, the following properties must be customized to reflect the target deployment environment.

Property NameDescription
anypoint-mq.client-idAnypoint MQ client ID
anypoint-mq.client-secretAnypoint MQ client secret
sfdc.fsc.usernameSalesforce instance client username
sfdc.fsc.tokenSalesforce instance client security token
sfdc.fsc.passwordSalesforce instance client password
sfdc.fsc.client-idSalesforce instance client ID
sfdc.fsc.client-secretSalesforce instance client secret
sfdc.fsc.accounts-listener-stateFinancial account topic listener enabled or disabled state
sfdc.fsc.cards-listener-stateCards topic listener enabled or disabled state
sfdc.fsc.transactions-listener-stateTransactions listener enabled or disabled state
sfdc.fsc.update-sourceExternal ID type code representing the Salesforce Organization from which updates are published

The External ID type code is used to identify which system is publishing an update. When multiple Salesforce FSC instances are involved in the process, the sfdc.fsc.update-source value is used to identify where the update came from (e.g., SALESFORCE_FSC_INSURANCE).

Running the application from Anypoint Studio

The following instructions are for running applications from Studio but apply to debugging as well.

  1. Update the src/main/resources/config/config-local.yaml file and provide values for the properties described above.
  2. Right-click the project and select Run As -> Mule Application (configure)
  3. If hidden deployment properties (e.g., Anypoint MQ credentials) are required, select the Arguments tab and add the property definitions to the VM arguments section. For example:
     -M-Dsfdc.username=<provide password> -M-Dsfdc.password=<provide password> -M-Dsfdc.token=<provide token> -M-Dsfdc.client-id=<provide client-id> -M-Dsfdc.client-secret=<provide client-secret>
  4. Click Run to launch the application.

To debug an application, choose Debug As -> Mule Application (configure) in the second step instead.

Deployment instructions for CloudHub

The following instructions apply to CloudHub deployments only.

  1. Update the config-dev.yaml properties as described above. You can also choose to add them to your settings.xml file instead.
  2. Use one of the following scripts to deploy application to CloudHub:

    • packageDeploy.sh (Mac/Linux) or packageDeploy.cmd (Windows) - clean, build, and deploy the application
    • deployOnly.sh (Mac/Linux) or deployOnly.cmd (Windows) - deploy a previously-built application
  3. Bring up the Runtime Manager console in Anypoint and monitor the application for proper startup.

To deploy a second instance to connect to a different Salesforce org, change the second profile name to a new one (e.g., FSC-Insurance-DEV) and then run the deployment script again.

Next steps

Visit the Data mappings tab to learn more about how data is mapped between the Salesforce instance and the canonical model.


Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onDec 13, 2022
Asset overview

Asset versions for 1.7.x

Asset versions
VersionActions
1.7.0