Force.com (or its application, Salesforce) is a cloud environment which can store various business data or run transactional business logics.
Because the service is located entirely in the "cloud", it is difficult to cooperate with "intranet" systems which are behind the firewall, especially when the trigger occurs in Force.com side.
This project is an attempt to accomplish cloud-to-intranet messaging, without breaking firewall policies, by using Force.com Streaming API.
See the slides:
http://www.slideshare.net/shinichitomita/cloudtointranet-messaging-by-forcecom-streaming-api
- Open ${project_root}/forcedotcom/.project in Eclipse with Force.com IDE.
- Deploy it to your desired Salesforce organization.
-
First, please make sure you installed MySQL and mysqld is running
-
Run SQL script to setup demo objects into MySQL database
$ cd
-
Please make sure you installed Node.js, npm, and coffee script.
-
Install bundled libraries
$ cd
-
Startup SecureConnect resource server
$ SF_USERNAME=user@example.org
SF_PASSWORD=password
MYSQL_USER=root
MYSQL_PASWORD=pass
MYSQL_DATABASE=test
coffee server.coffee
- Log in to Salesforce and access "SC Client" tab.
- Put your name to first text field and press "Hello" button.
- It pops up "Hello, <your name>" alert box.
- Confirm the resource server log that the message is arrived from request client.
- Log in to Salesforce and access "SC Client" tab.
- Put a SQL "SELECT * FROM EMP" to the second text field and press "Query" button.
- After a few seconds, it shows query result in a table in the page.
- Confirm the data is queried from local MySQL database by checking the resource server log.
- Log in to Salesforce and access to Opportunity tab.
- Creaate an Opportunity record and save.
- Update the opportunity to set Stage field value to "Close - Won" (or equivalent). Please also input field values like Amount or Close Date field.
- After a few seconds, refresh the page, and check that External System ID field has a value. If there's no field entry in the page, please change page layout to include the field.
- Confirm that MySQL database has a new record in billing table, including sfdc_id, name, amount, and close_date column data, which is copied from opportunity record in Salesforce.