This topic describes how to run the TIBCO BusinessEvents "Fraud Detection with StreamBase" sample application, which illustrates how to use TIBCO BusinessEvents and StreamBase CEP together using BusinessEvents' StreamBase channel.
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.
In StreamBase Studio, import this sample with the following steps:
From the top-leve menu, select> .
businesseventsto narrow the list of options.
Select TIBCO BusinessEvents Fraud Detection from the Extending StreamBase category.
StreamBase Studio creates a project named BusinessEventsFraudDetection in your current Studio workspace.
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:
In the Project Explorer, double-click to open the
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.
The application is now ready to receive tuples from the BusinessEvents sample.
Follow the steps below to run the BusinessEvents side of the sample.
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
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.
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.
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.
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:
See Default Installation Directories for the default location of
studio-workspace on your system.