TIBCO BusinessEvents Fraud Detection Sample

This topic describes how to run the TIBCO BusinessEvents Fraud Detection with StreamBase sample application, which illustrates how to use TIBCO BusinessEvents and StreamBase together using the BusinessEvents' StreamBase channel.

Sample Overview

This sample is made up of two parts, one running in TIBCO BusinessEvents and one in StreamBase. The sample is a variation on BusinessEvents' popular Fraud Detection sample, only modified to use a StreamBase application to implement the fraud detection logic.

Strictly speaking, the StreamBase part of the sample is BusinessEvents-agnostic; it simply exposes an input stream to receive a tuple describing a bank debit transaction, applies the fraud detection logic, and emits a tuple on an output stream if fraud is suspected.

The BusinessEvents side of the sample provides the facilities for managing the bank account(s) and processing the actual debit transactions. It makes use of its StreamBase channel to exchanges tuples with the StreamBase application.

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 business to narrow the list of options.

  • Select TIBCO BusinessEvents exchanging messages with StreamBase from the Other TIBCO Product Connectivity category.

  • Click Import Now.

StreamBase Studio creates a project named BusinessEventsFraudDetection in your current Studio workspace.

Running This Sample

The StreamBase sample should be started first as it acts as a server for the fraud detection services.

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

  1. In the Project Explorer, double-click to open the BusinessEventsFraudDetection.sbapp application.

  2. Make sure the application is the currently active tab in the EventFlow editor, then click the Run button. This opens the SB Test/Debug perspective and starts the module.

  3. The application is now ready to receive tuples from the BusinessEvents sample.

  4. Follow the steps below to run the BusinessEvents side of the sample.

  5. When done running the sample, press F9 or click the Terminate EventFlow Fragment button.

To load the BE side of the sample in BusinessEvents Studio, select File | Import... | General/Existing Projects into Workspace, and navigate to %TIBCO_HOME%\be\<version>\examples\standard\FraudDetectionStreamBase.

To run the BusinessEvents sample, look under your BusinessEvents install directory in examples/standard/FraudDetectionStreamBase. In this directory you will find a readme.html file that describes the BE sample and how to run it.

This Sample's Files

The StreamBase side of this sample has the following files:

  • The sample EventFlow application, BusinessEventsFraudDetection.sbapp, and its associated layout file.

TIBCO BusinessEvents version 5.3 and above ships with the corresponding BE sample called FraudDetectionStreamBase. Both the BE and SB samples must be run together on the same network (or the same machine) for the sample to function as expected.

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_BusinessEventsFraudDetection

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