Contents
This topic describes how to run the sample application for the TIBCO StreamBase® WikiMedia EventStreams adapter, and demonstrates
the processing of continuous streams of structured event data from one or more EventStreams web services associated with wikipedia.org
.
The sample, wikiSample.sbapp
, demonstrates a complete process of parsing EventStreams and how to use the Control Port to control the connection and disconnection
of streams.
The addresses of the wikipedia.org
EventStreams are built in to the adapter and do not need to be specified.
In StreamBase Studio, import this sample with the following steps:
-
From the top-level menu, select
→ . -
Type
Wiki
to narrow the list of options. -
Select Wikimedia EventStreams Adapter from the StreamBase Standard Adapters category.
-
Click OK.
StreamBase Studio creates a single project for the wiki adapter samples in your current Studio workspace.
Run this sample in Studio as follows:
-
In the Package Explorer view, open the sample you just loaded.
-
Double-click to open the
wikiSample.sbapp
application. -
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 application.
-
In the Application Output view, look for different output streams.
-
When done, press F9 or click the Stop Running Application button.
Use the control port to send action commands to the adapter. Tuples enqueued on this port cause the adapter to connect or disconnect to certain EventStreams, or to specify a new data starting time Since value.
The EventStream you address in the control port tuple must already be configured and present in the adapter. That is, you cannot use a control port tuple to add an EventStream that is not already in place.
-
Command, string, the command to send to the adapter.
Valid values are:
-
Connect — Tells the adapter to connect to the EventStreamName URI specified in the control port's input tuple.
-
Disconnect — Tells the adapter to disconnect from the EventStreamName URI specified in the control port's input tuple (if a connection to that URI currently exists).
-
-
EventStreamName, string. The EventStream to connect to.
Valid values are:
-
page-create
-
page-move
-
page-delete
-
recentchange
-
revision-create
-
page-undelete
-
page-properties-change
-
-
Since, string.
-
If provided, this timestamp is used as the historical starting position in each of the requested streams.
-
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_adapter_embedded_wiki
See Default Installation Directories for the default location of studio-workspace
on your system.