Working with Bulk2Sample Project

The Bulk2Sample project gives you a quick overview of how to use the Salesforce Bulk API 2.0 Palette of 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. Edit the bulkInputFile module property to point to the TIBCO_HOME\bw\palettes\salesforce\version_number\samples\Bulk2_0Sample\bulkInsert.csv file provided in the Bulk2_0Sample. Modify the outputFilePath module property to point to any empty csv file in the system. Save the project.
  6. Configure the processes that are created:
    1. BulkOperationCSV Process

      This process creates an Account object named BulkInsertAccount by using the bulkInsert.csv file provided in the module property. It then updates the account object's name to Updated Account by using the sObject mapped in the input section of SfBulkIngestBulkOperationUpdate activity. The result of the update activity is retrieved and the created and updated object is deleted as part of cleanup.

    2. SubscriberTrigger Process

      This process creates an account named AccountNew to trigger the BulkQuery process starter Subscriber.

    3. BulkQuery Process

      Run this process after running SubscriberTrigger at least once. The Subscriber is triggered when an account with the name AccountNew is created. The Bulk 2.0 query queries for all accounts with the name AccountNew. The results are fetched with Get Result and printed by using the Log activity.

    4. SfbulkGetBatchedResult Process

      In this process 20 account objects with the name BatchedAccount are inserted. Then queried by using Bulk 2.0 Query and the results are retrieved in batches using Bulk 2.0 Get Result with maxRecords fetched in one iteration limited to 5. The results are written to the file provided in the outputFilePath module property.

    5. Cleanup Process

      Run this process after running the BulkOperationCSV, SubscriberTrigger, BulkQuery, and SfbulkGetBatchedResult processes. This cleans up the data created in these processes.

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