Working with TopicSubscriberSample Project

The TopicSubscriberSample project gives you a quick overview of how to use the Salesforce Subscriber activity of the TIBCO ActiveMatrix BusinessWorks™ Plug-in for Salesforce.com.

Procedure

  1. Start TIBCO Business Studio.
  2. Click File > Import.
  3. In the Import window, expand the General folder and select the Existing Studio Projects into Workspace item. Click Next.
  4. Click Browse next to the Select archive file field to locate the samples. Click Finish.
    The sample project is located in the TIBCO_HOME\bw\palettes\salesforce\version_number\samples\TopicSubscriberSample directory.
  5. Change the values in the User Name and Password fields in the Connection Configuration panel of the Salesforce Connection shared resource.
  6. In this project, five processes are created under three packages, initpushtopic, topicsubscribersample and filtertopicsubscribersample. Configure these processes as explained below:
    • CreatePushTopic Process

      This process creates a push topic on the Salesforce server with the name provided.

    • AccountUpdates Process

      This process creates a record, updates it, and then deletes the record in the end.

    • SubscribeToAccountUpdates Process

      This process provides the same topic name that was created in CreatePushTopic process. It subscribes to the topic name and generates a process event for each message received from AccountUpdates process. It starts receiving messages for all updates to the object in the last 24 hours.

    • AccountUpdatesForFilter Process

      This process creates a record with the filter string set to name. Then it first creates a record that does not have a filter string and then updates it to contain a filter string. Both the records are deleted at the end.

    • FilteredTopicSubscriber Process

      In this process, the topic name AccountUpdates is provided. A filter string is also provided to validate the condition. Note that the topic name is the same as that provided in the CreatePushTopic process. It subscribes to the topic name and generates a process event for each filtered message received from AccountUpdatesForFilter process. It starts receiving messages for all updates to the object in the last 24 hours.

  7. Test and run the processes in the project, in the order they have been listed earlier.