Running the Sample Application

A sample application is provided that gives an example of the available Tools Interface methods in the Application class. It provides a UI that allows you to enter the needed information (e.g., work item ID, version number, etc.), then execute a method.

The sample application is located in the following directory:

StudioHome\wcc\version\samples\wccApplicationMethods\

where:

  • StudioHome is the directory in which TIBCO Business Studio was installed.
  • version is the version number of Workspace that was installed with TIBCO Business Studio.

Also note that a wccApplicationMethods.create.war.cmd file is provided that can be used to create a WAR file that can be used to deploy the sample application to a runtime node. For more information, see the "Deploying an Application After Customizing" topic in the TIBCO Workspace Configuration and Customization guide.

Procedure

  1. Copy the following directory:
    \samples\wccApplicationMethods\JSXAPPS\wccApplicationMethods\
  2. Paste the directory you’ve just copied into the following directory:

    StudioHome\wcc\version\JSXAPPS\

  3. Open the following file with an editor:

    StudioHome\wcc\version\JSXAPPS\wccApplicationMethods\config.xml

  4. Locate the ActionProcessors record in the config.xml file and modify the baseUrl attribute to point to your Action Processor:
    <record jsxid="ActionProcessors" type="workspace">
        <ActionProcessor
           weighting="100"
           baseUrl="http://Austin:8080/bpm/actionprocessor/actionprocessor.servlet">
        </ActionProcessor>
    </record>

    The baseUrl attribute string must be in the form:

    http://Host:Port/bpm/actionprocessor/actionProcessor.servlet

    where:

    • Host is the name of the machine hosting the BPM runtime.
    • Port is the port number used by the ActiveMatrix WebApp Implementation Type to communicate with web applications.

      For more information about the ActionProcessors record, see the TIBCO Workspace Configuration and Customization guide.

  5. Save and close the config.xml file.
  6. Copy the wccApplicationMethods.html file from the following directory:
       StudioHome\wcc\version\Samples\wccApplicationMethods\
  7. Paste the file you’ve just copied into the installation directory:

    StudioHome\wcc\version\

  8. Ensure your server is running.
  9. Start the sample application by pointing your browser to the following:

    StudioHome\wcc\version\wccApplicationMethods.html

    The following screen is displayed:

    The Application Methods field provides a drop down list containing all of the available application methods. When you select a method from the list, the fields on the screen change to the appropriate fields for the selected method.

  10. Enter any required information, then click the Execute button to execute the method.

    Note that the Default Exception Handling check box allows you to specify how exception handling will be accomplished for methods called from the sample application. This check box sets the toolsErrorHandlingEnabled property. Checking the box sets the property to true, which causes a message to be displayed to the user if an Action Processor exception is returned. Unchecking the box sets the property to false, which disables the default error handling; messages are not displayed to the user if an Action Processor exception is returned — the exception should be handled by the calling application.