Working with the Record_Listener Process

The Record_Listener process shows you how to listen to the Create, Edit, and Delete user events triggered on the Event record and then publish an XML message encapsulating the data of the record on which the event was triggered.

Prerequisites

Before running the process, ensure that you have completed the following steps:
  1. Importing the Sample Project.
  2. Configuring the NetSuite Connection Shared Resource.

Procedure

  1. Expand the NetSuiteSample project in the Project Explorer view.
  2. Configure the HTTP Connector shared resource.
    1. Expand the NetSuiteSample node and click Resources > netsuitesample.
    2. Double-click HTTPConnectorResource.httpConnResource.
    3. Specify the Host and Port fields in the Basic Configuration tab.
      Note: Make sure the values of the <httpServer> and <httpPort> elements in the RecordListenerHTTPConfig.xml file, which you uploaded to the NetSuite website, are consistent with the values specified in the Host and Port fields respectively.
  3. Expand Processes > netsuitesample.
  4. Double-click Record_Listener.bwp.
  5. Right-click the Record Listener activity in Process Editor and select Show Properties View from the menu that is displayed.
  6. Configure the Record Listener activity.
    Note: Make sure the values of the <httpPath>, <listenerUsername>, and <listenerPassword> elements in the RecordListenerHTTPConfig.xml file, which you uploaded to the NetSuite website, are consistent with the values specified in the Relative Path, Username, and Password fields respectively.
  7. Right-click Record_Listener.bwp in the Project Explorer view and click Run As > Launch BusinessWorks from the menu that is displayed.
  8. Deploy the Event record in the script that you created in the NetSuite system and then add, update, or delete the Event record in the NetSuite system.

    See "Running Scripts in NetSuite" in TIBCO ActiveMatrix BusinessWorks Plug-in for NetSuite Installation for how to create a script in the NetSuite system.

  9. Click the Terminate icon to stop the process.

Result

The Record_Listener process listens to the user events triggered on the Event record, and you can see the operation you did in the eventType element in the Output tab of the Record Listener activity.