TIBCO ActiveMatrix BPM Operator Sample

This topic describes how to run the TIBCO ActiveMatrix BPM® operator sample application, which illustrates how to use the operator with an ActiveMatrix BPM server. For more information on this operator, see Using the TIBCO ActiveMatrix BPM Operator.

Sample Overview

This demonstrates a few of the available REST APIs available via the ActiveMatrix BPM server. Every ActiveMatrix BPM REST service can be called by this single operator depending on its setup. This demo covers three of them:

  • BusinessServicesList

  • BusinessServicesStart

  • BusinessServicesCancel

Importing This Sample into StreamBase Studio

In StreamBase Studio, import this sample with the following steps:

  • From the top-level menu, select File>Import Samples and Community Content.

  • Enter active to narrow the list of options.

  • Select TIBCO ActiveMatrix BPM Operator from the Other TIBCO Product Connectivity category.

  • Click Import Now.

StreamBase Studio creates a single project for the ActiveMatrix BPM Operator sample in your current Studio workspace.

Running This Sample in StreamBase Studio

The steps to run this sample in Studio are as follows:

  1. There are a few parameters that must be setup in the engine.conf file before this sample is run. These options will tell the sample which ActiveMatrix BPM business service we will be using. To change the operations please do the following:

    • Open the engine.conf for editing.

    • Edit the operator-parameter value fields with the correct information for you server and your business service.

  2. In the Project Explorer, open the sample you just loaded.

    If you see red marks on a project folder, wait a moment for the project to load its features.

    If the red marks do not resolve themselves after a minute, select the project, right-click, and select Maven>Update Project from the context menu.

  3. Open the src/main/eventflow/packageName folder.

  4. Open the demo.sbapp file and click the Run button. This opens the SB Test/Debug perspective and starts the module.

  5. In the Manual Input view, select the InBusinessServicesList input stream.

  6. Click Send Data, this will trigger the BusinessServiesList REST API to be called and an output tuple will be created with the results.

  7. Still in the Manual Input view, select the InBusinessServicesStart stream and click Send Data (leaving all fields null). This will cause the default values you had previously entered into the engine.conf to be sent as part of a Business Services Start REST API call.

  8. In the Output Streams view, select the last item displayed for the Output Stream OutBusinessServicesStart and copy the value of the output fields via path 'serviceResults\context\processReference\id'.

  9. In the Manual Input view, select the InBusinessServicesCancel stream.

    Enter the following values:

    • processId: Use the process Id copied from the step above

    Click Send Data which will trigger a business services cancel operation with the given process Id to be sent to the server.

  10. When done, press F9 or click the Terminate EventFlow Fragment button.

This Sample's Files

This sample has the following files:

  • The sample EventFlow application, demo.sbapp.

  • A corresponding engine.conf, which is used by the StreamBase Server to correctly configure the Java environment and to set up the parameters required for the demo.

Sample Location

When you load the sample into StreamBase® Studio, Studio copies the sample project's files to your Studio workspace, which is normally part of your home directory, with full access rights.

Important

Load this sample in StreamBase® Studio, and thereafter use the Studio workspace copy of the sample to run and test it, even when running from the command prompt.

Using the workspace copy of the sample avoids permission problems. The default workspace location for this sample is:

studio-workspace/sample_tibco_activematrix_bpm

See Default Installation Directories for the default location of studio-workspace on your system.