Upload
wso2
View
802
Download
10
Tags:
Embed Size (px)
DESCRIPTION
Citation preview
What, Where, Why and How?
• What? Hybrid Cloud Integration. Most organizations will use hybrid cloud approach, which is a combination of private computing resources and public services, with integration touch points between these environments.
– Where? Cloud Based Integration Backbone. Cloud-based infrastructure with a rich portfolio of application adapters that simplify connectivity to external systems such as ERP applications (SAP, Seibel), social platforms (Twitter, Facebook), SaaS (Salesforce.com, NetSuite, PayPal), and other integration endpoints.
– Why? Allows to implement interoperability between the cloud and on-premise environments. Better than on-premise integration tools.
– How? Developed a proof of concept: SFDC to SAP Integration using WSO2 technologies.
Service integration and governance are critical to creating an agile cloud IT ecosystem
– If governance was a challenge in the past, cloud introduces new and more complex risks
– Changing role of IT and the business – risk of IT losing alignment to the business, who are driving cloud services within the enterprise
– Service integration and interoperability becomes critical to achieving true benefits of cloud
– Without the proper strategy and controls, end users take over defining IT infrastructure
Hybrid Cloud Management via Broker
Accenture Cloud Platform accelerates cloud adoption with the integration and orchestration of cloud services
• Aggregate. Comprehensive catalog of services offered through a centralized, online storefront
• Integrate. Cloud provider and value-added services are pre-integrated and available via self-service to users
• Automate. Services are automated and orchestrated for on-demand request and fulfillment
• Manage. Services are monitored and managed with online dashboards, and metered and charged-back centrally
Infrastructure Architecture
Use Case Description
SFDC Account to SAP Customer Master - Create
When an Account Type is updated from Prospect to Customer in Salesforce.com, create a new Customer in SAP
SFDC Account to SAP Customer Master – Update
When a Customer Account is updated in Salesforce, update the corresponding Customer record in SAP
Update SFDC Chatter window
When a Customer is created or updated in SAP, Salesforce chatter is updated: “Updated customer record in SAP, customer ID ##"
Integration Use Cases
iPaaSAccount Customer
iPaaSAccount Customer
iPaaSChatter
Transaction Status
Integration Approach
WSO2 ESB is used as a cloud based integration backbone to pass messages from system to system:
– Provides agility and flexibility to adopt to future change and growth– Location transparency, transformation, routing, protocol conversion– Reliable messaging, security, monitoring/management
Application-level integration uses the native application's integration frameworks and APIs:
– It preserves the application's data integrity– Allows real-time Integration between Salesforce and SAP– Provides application level security and audit trail
Salesforce SOAP API, REST API, and WSO2 Salesforce Connector:– Outbound messaging is part of the workflow rule functionality in Salesforce– Workflow Rules send SOAP messages over HTTPS to a designated ESB endpoint
SAP JCO API and WSO2 SAP Connector:– SAP adapter implements two types of connections: BAPI/RFC and IDoc transport– We used IDoc transport due to scalability and performance advantages– SAP JCO middleware library establishes connections on TCP port 3300
Salesforce.com Connector
• Download Salesforce connector:salesforce-cloud-connector-1.0-SNAPSHOT.zip
• Add Salesforce Cloud connector mediation library in WSO2 ESBESB Console: Manage > Mediation Libraries > AddClick import link. Click yes to confirm.
Salesforce.com Connector• New: Salesforce cloud connector in Developer Studio
Click on 'Import Cloud Connector' from the project context menu.
Salesforce Mediation Library
• The WSO2 SFDC mediation library contains a set of ESB templates and it supports following operations.
• Log in• Logout• Create• Update• Query and QueryMore• You can invoke any of these operations inside the
ESB configuration by using Call Template Mediator.
Usage of ESB Templates
• Query
<call-template target="org.wso2.carbon.mediators.salesforce.query"> <with-param name="salesforce.query.queryString"
value="select name from account”/></call-template>
Usage of ESB Templates• Login
• Create
<call-template target="org.wso2.carbon.mediators.salesforce.login"> <with-param name="salesforce.password" value=“XXXXcP55iu429U343vUEDVQnug6wd"/> <with-param name="salesforce.username" value=“[email protected]"/></call-template>
<urn:createxmlns:urn = "urn:partner.soap.sforce.com"xmlns:urn1 = "urn:sobject.partner.soap.sforce.com"> <!--Zero or more repetitions:--> <urn:sObjects><urn1:type>?</urn1:type> <!--Zero or more repetitions:--><urn1:fieldsToNull>?</urn1:fieldsToNull><urn1:Id>?</urn1:Id> <!--You may enter ANY elements at this point--> </urn:sObjects></urn:create><call-template target="org.wso2.carbon.mediators.salesforce.create"/>
Configure SAP Connector on WSO2 ESB
• Install SAPJCO libraryorg.wso2.carbon.transport.sap-VERSION.jar
• Configure SAP Endpoint PropertiesJCOCLIENT.destJCOSERVER01.server
• Configure new ESB Transport <transportSender name=”idoc” class="org.wso2.carbon.transports.sap.SAPTransportSender"/>
Configure Salesforce Outbound Messages
• Login to Salesforce.Com• Click User name | Setup | Create | Workflow &
Approvals | Workflow Rules and create a new workflow rule that fires when a candidate is created, or when a candidate is edited and did not previously meet the rule's criteria.
Salesforce Workflow Rules
Define Salesforce Outbound Messages
ESB Proxy to receive Salesforce message
Map Salesforce and SAP IDoc schemas
XSLT transform & send IDoc in ESB Proxy
<proxy xmlns="http://ws.apache.org/ns/synapse" name="SFToSAP"> <target> <inSequence> <xslt key=”Account.xsl”/> <property name="OUT_ONLY" value="true"/> <send> <endpoint> <address uri="idoc:/JCOCLIENT"/> </endpoint> </send> </inSequence> </target></proxy>
Receive an IDOC from SAP System
<proxy xmlns="http://ws.apache.org/ns/synapse" name="SAP2SF" transports="idoc" statistics="enable" trace="enable" startOnLoad="true"> <target> <inSequence> <header name="Action" value="urn:customHeader"/> <property name="OUT_ONLY" value="true" scope="default" type="STRING"/> <property name="messageType" value="text/xml" scope="axis2" type="STRING"/> <!-- Do the transformation of the incoming IDOC XML-> Salesforce Request. --> </inSequence> </target> <parameter name="transport.sap.enableTIDHandler">enabled</parameter> <parameter name="transport.sap.serverName">JCOSERVER01</parameter> <parameter name="transport.sap.enableErrorListener">enabled</parameter> <description></description></proxy>
ESB Proxy to update Salesforce Chatter
<sequence xmlns="http://ws.apache.org/ns/synapse" name="chatterFeedSeq"> <property xmlns:ns="http://org.apache.synapse/xsd" name="access_token" expression="//access_token"/> <property xmlns:ns="http://org.apache.synapse/xsd" name="Authorization“ expression="fn:concat('Bearer ', $ctx:access_token)" scope="transport"/> <property xmlns:ns="http://org.apache.synapse/xsd" name="REST_URL_POSTFIX" expression="$ctx:msg_param" scope="axis2"/> <property name="HTTP_METHOD" value="POST" scope="axis2"/><endpoint> <address uri="https://na15.salesforce.com/services/data/v27.0/chatter/feeds/news/me/feed-items" format="rest"/> </endpoint> </send></sequence>
• Prior to this call obtain a new OAuth access token by sending a POST request to the token request endpoint
SAP Configuration
• Login to SAP GUI• Create logical system and RFC destination• Create Port to associate with RFC Destination
and Partner profile.• Partner Profile will have Inbound and Outbound
IDOC Parameters that includes IDOC type Message type and Function Module.
• Data in the format of IDOC can flow from SAP to any other system and vice versa through ALE (Application Link Enabling).
• Former is usually called Outbound IDOC and latter is Inbound IDOC.
SAP Configuration: Partner Profile
• Transaction WE20 for Maintenance of the Partner Profile. In the logical system that is chosen as a partner add the message type based on the direction of the interface.
What is an IDOC?
• IDocs serve as the vehicle for data transfer in SAP's Application Link Enabling (ALE) system.
• IDocs are used for asynchronous transactions, provide scalability and performance advantages
• Data gets stored intermediately in temporary tables and can be used for recovery or reprocessing to avoid data loss.
• Does not require SAP coding skills unlike other methods (ABAP, BAPI)
• IDoc is a SAP supported data document format to transfer data in a hierarchical structure.
IDoc Examples
Business type IDOC type
Material MATMAS
Bill Of Material BOMMAT
HR User HRMD_A
Customer DEBMAS
Supplier CREMAS
Invoice INVOIC
WEDI – Manage IDOC implementation
Transaction WE60 to get IDoc XML schema
Integration in Action
Salesforce.com Account Update
SAP Customer Master Synch
SAP Inbound IDoc Messages
• Run transaction WE02 to check the status of the inbound IDoc
SAP Inbound IDoc Message Details
• Status 53 means IDoc has been processed successfully.
• Status 53 means IDoc has been processed successfully.
Salesforce Chatter Update
Lessons Learned• WSO2 ESB is a powerful and stable product• For your first integration flow, consider engaging a
WSO2 consultant or work with an experienced WSO2 partner
• WSO2 documentation for Salesforce and SAP connectors is immature
• SAP Documentation for IDOCs is not complete/confusing
• To avoid project delays, make sure you have the following roles on your team:
– SAP Admin– SAP DBA– SAP ABAP Developer with ALE/IDoc experience– Network Admin– OS Admin
References
WSO2 Connectors Guide:http://docs.wso2.org/display/ESB480/Working+with+ConnectorsWSO2 SAP Integration Guide:http://docs.wso2.org/display/ESB470/SAP+IntegrationSalesforce REST API Developer’s Guide:http://www.salesforce.com/us/developer/docs/api_rest/api_rest.pdf
Salesforce SOAP API Developer’s Guide:http://www.salesforce.com/us/developer/docs/api/apex_api.pdf
Thank You