Using JCA Salesforce Adapter with SOA Suite

Oracle Cloud Adapter for Salesforce.com is certified only with SOA Suite 11.1.1.7. This JCA adapter can be download from https://edelivery.oracle.com/.
The pre-requisite is to install:

Once, your environment is setup, it is easy to build a BPEL process and use the Oracle Cloud Adapter for Salesforce. Before bouncing your weblogic server, apply the following steps in order to avoid certificate issue during runtime:

  • add public certificate from Salesforce.com in your cacert file of your weblogic server
  • de-activate host name verifier in weblogic

The BPEL process

Let’s build a simple request/reply BPEL process to create an Account based on name provided from BPEL process. I have tested the creation from Salesforce Web site and we just need to provide an account name to get the record created in Salesforce.

The composite.xml looks like this:
SFDC-soa-AccountCreation-composite2

The BPEL process just invoke the JCA adaptor and call teh synchronous create operation exposed by Salesforce.
SFDC-soa-AccountCreation

Oracel SOA suite provided an easy and understable JCA Adator to connect to Salesforce.com platform. Let’s see this throught the Cloud’s JCA wizzard:

Oracle Cloud Adapter for Salesforce.com – Wizard – Step1
SFDC-jca-adaptor-wizzard-1

Oracle Cloud Adapter for Salesforce.com – Wizard – Step2
SFDC-jca-adaptor-wizzard-2

Oracle Cloud Adapter for Salesforce.com – Wizard – Step3
SFDC-jca-adaptor-wizzard-3

Oracle Cloud Adapter for Salesforce.com – Wizzard – Step3-1
SFDC-jca-adaptor-wizzard-4

Oracle Cloud Adapter for Salesforce.com – Wizard – Step3-2
SFDC-jca-adaptor-wizzard-3-1

Oracle Cloud Adapter for Salesforce.com – Wizzard – Step4-1
SFDC-jca-adaptor-wizzard-4-1

Oracle Cloud Adapter for Salesforce.com – Wizzard – Step4-2
SFDC-jca-adaptor-wizzard-4-2

Oracle Cloud Adapter for Salesforce.com – Wizzard – Step4-3
SFDC-jca-adaptor-wizzard-4-3

Oracle Cloud Adapter for Salesforce.com – Wizzard – Step5
SFDC-jca-adaptor-wizzard-5

Oracle Cloud Adapter for Salesforce.com – Wizzard – Step6
SFDC-jca-adaptor-wizzard-6

Before testing the Business Process, you need to define in EM console the csfmap and csfkey needed by the JCA Adaptor

<adapter-config name="Service_SFDC_CreateAccountPortType" adapter="Salesforce" wsdlLocation="../soaSFDCWF/Service_SFDC_CreateAccount.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
  <connection-factory location="cloud/CloudAdapter">
    <non-managed-connection managedConnectionFactoryClassName="oracle.cloud.connector.salesforce.SalesforceConnectionFactory">
      <property name="targetWSDLURL" value="enterprise.wsdl"/>
      <property name="csfkey" value="MyCSF_SFDC_KEY"/>
      <property name="csfMap" value="SOA"/>
      <property name="applicationVersion" value="30.0"/>
    </non-managed-connection>
  </connection-factory>
  <endpoint-interaction portType="Service_SFDC_CreateAccountPortType" operation="create">
    <interaction-spec className="oracle.tip.adapter.cloud.CloudInteractionSpec">
      <property name="targetOperation" value="create"/>
      <property name="operationPath" value=""/>
      <property name="oracle.cloud.rt.sfdcAdapterNamespace" value="http://xmlns.oracle.com/pcbpel/adapter/salesforce/ApplicationSFDC/soaSFDCWF/Service_SFDC_CreateAccount"/>
      <property name="selectedObjects" value="Account"/>
      <property name="AllOrNoneHeader.allOrNone" value="true"/>
      <property name="oracle.cloud.rt.suppressResponse" value="false"/>
    </interaction-spec>
  </endpoint-interaction>
</adapter-config>

Connect to the EM console, and configure security credentials used by your JCA adaptor
SOA-EM-Secuirty-1
SOA-EM-Secuirty-2

Now, your are ready to test the BPEL process and validate that it is working as expected:
SFDC-SOA-EM-instance-1

SFDC-SOA-EM-instance-2

By connecting to Salesforce, we can validate that the account has been created successfull, and check that session did not increase for each call.
SFDC-gui-login-history

SFDC-Account-creation-from-BPEL

Thanks for reading !

Advertisements

About Chenda Mok

19 years of hands on experience in software design and development with emphasis on Enterprise Application Integration (EAI), Services Oriented Architecture (SOA) and Identity Management (IDM) solutions. I’m a software engineer, member of the professional service delivery team working for Salesforce. Prior to this, I worked for Oracle as Solution Architect, through SeeBeyond(06/2005), then SUN’s acquisition (04/2009). After my master’s degree in computer science in 1997; I always delivered consulting on architecture, design, implementation on integration’s field. I’m interested in architecture using EAI/SOA/IDM/BPM/Cloud technologies, software development and Java’s related technologies. I may blog about my work/activities at Salesforce, but I do not speak for my employer, past, present or future.
This entry was posted in bpel, SOA Suite and tagged , , , . Bookmark the permalink.