Newer Version Available

This content describes an older version of this product. View Latest

Step 1: Deploy a Sample Project to Your Org

  1. Download the Salesforce Durable Generic Demo .zip file from the developerforce github repository.
    If you want, you can browse the contents of the project at https://github.com/developerforce/SalesforceDurableGenericDemo. The following components are installed in your org when you deploy the .zip file.
    Component Description
    StreamingGenericMessageDisplay A Visualforce component that uses the CometD extension cometdReplayExtension to replay events. The extension handles the handshake and subscribe calls and sets replay options.

    Having the replay functionality in a Visualforce component allows you to add it to your Visualforce page for reuse in your app.

    StreamingGenericReplayController Apex controller that holds the logic behind the Visualforce page.
    StreamingChannel Custom object used for creating streaming channels.
    StreamingDurableGenericDemo Visualforce Page Visualforce page. This page is the main page you use to replay test events.
    StreamingDurableGenericDemo Permission Set Permission set used to grant read and create access to the StreamingChannel sObject.
    cometdReplayExtension Static resource representing a CometD extension in JavaScript. This extension implements the replay mechanism for Streaming API.
    cometd, jquery, jquery_cometd, json2 Static resources for CometD, jquery, and JSON.

    You use Workbench to migrate the zip file to your org.

  2. Log in to Workbench at https://workbench.developerforce.com/login.php.

    Workbench is a free, open source, community-supported tool (see the Help page in Workbench). Salesforce provides a hosted instance of Workbench for demonstration purposes only—Salesforce recommends that you do not use this hosted instance of Workbench to access data in a production database. If you want to use Workbench for your production database, you can download, host, and configure it using your own resources. You can download Workbench from https://github.com/ryanbrainard/forceworkbench/releases.

    Important

  3. For Environment, keep the production default value.
  4. Ensure that the value for API Version is at least 36.0.
  5. Check the terms of service box, and then click Login with Salesforce.
  6. Enter your Developer Edition org username and password, and then click Log In.
  7. Select migration | Deploy.
  8. Click Choose File and locate the .zip file that you downloaded.
  9. Click Next, and then click Deploy.
  10. Wait until the deployment finishes and the status of the deployment changes to Succeeded.
  11. Log in to your org in another browser tab.