Working with BulkSample Project

The BulkSample project gives you a quick overview of how to use the Salesforce Bulk API Palette of TIBCO ActiveMatrix BusinessWorks Plug-in for Salesforce.com.

Procedure

  1. Start TIBCO Business Studio and go to File > Import.
  2. In the Import window, expand the General folder and select the Existing Studio Projects into Workspace item and click Next.
  3. 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\BulkSample directory.
  4. Change the values in the User Name and Password fields in the Connection Configuration panel of the Salesforce Connection shared resource.
  5. Configure the processes that are created:
    1. BulkInsertJson Process
      This process inserts records for the contact sObject using JSON format and queries the record using Bulk Query.
      1. Provide the IBCO_HOME\bw\palettes\salesforce\version_number\samples\BulkSample\sampleDataJson.json file in the BulkInsert activity.
      2. Create a file test.json on your system.
      3. Provide that location in the Output File of Insertgetresult activity.

    2. BulkUpdateRow Process

      This process updates the record inserted by the above process by using the Update operation of the Bulk Operation activity with ROW format.

    3. BulkUpsertRow Process

      This process upserts the record inserted by the above process by using the Upsert operation of the Bulk Operation activity with ROW format. You should create a file test.xml on your system and provide that location in the Output File on the General tab of Upsertgetresult activity.

    4. BulkUpsertXML Process

      This process updates the inserted records and inserts a new record by using the Upsert operation of the Bulk Operation activity. You should create a file sampledata.xml on your system and provide that location in the Output File of Upsertgetresult activity.

    5. BulkDeleteCSV Process

      Using the Bulk Operation activity's Delete operation, this process deletes the records that were inserted in the BulkInsertJson and BulkUpsertXML processes. You should create a file deletedata.csv on your system and provide that location in the Output File on the General tab of Upsertgetresult activity.

    6. BulkGetSubsetResult Process

      The process first creates records named from TibcoBW1 to TibcoBW11. Then a bulk query is run on these records with chunkSize set to 4. The result for this query is processed in subsets of 3 (meaning that each activity loop processes 3 batches) until all batches are processed. The results are logged, and the records are deleted as part of cleanup. After the records are processed, the job created by Salesforce Bulk Query is closed by using the Salesforce Close Job activity.

  6. Test and run the processes in the project, in the order they are listed above.