Contents
This topic describes how to run the sample application for the TIBCO® StreamBase
Adapter for Artifact Management Server. The sample, ams-client-sample.sbapp
, illustrates how to use the AMS client
adapter for enumerating the AMS projects and their artifacts, and for fetching,
adding, updating, and deleting artifacts. See the AMS Documentation for more information about the TIBCO® Artifact
Management Server, which is a separately installed product from Studio.
In StreamBase Studio, import this sample with the following steps:
-
From the top-level menu, select
> . -
Enter
ams
to narrow the list of options. -
Select Artifact Management Server (AMS) adapter from the StreamBase Standard Adapters category.
-
Click
.
StreamBase Studio creates a single project for the AMS adapter sample in your current Studio workspace.
To run this sample in Studio:
-
In the Project Explorer view, 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
> from the context menu. -
Open the
src/main/eventflow/
folder.packageName
-
Double-click to open the
ams-client-sample.sbapp
application, then click the Run button. This opens the SB Test/Debug perspective and starts the application. -
In the Manual Input view, select the Login input stream.
-
Click
. -
Observe the result emitted on the AMSOut output stream.
-
In the Manual Input view, select the ListProjects input stream.
-
Click
. -
Observe the result emitted on the AMSOut output stream.
-
In the Manual Input view, select the ListProjectArtifacts input stream.
-
Enter values in the
projectName
field. For example,sample
. -
Click
. -
Observe the result emitted on the AMSOut output stream. For example, if you literally typed
sample
, observe asuccess=true
message which simulates a successful search for an artifact project of that name. Other entered values may returnsuccess=true
orsuccess=false
message depending on the entry. -
In the Manual Input view, select the Logout input stream.
-
Click
. -
Observe the result emitted on the AMSOut output stream.
-
When done, press F9 or click the Stop Running Application button.
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_ams-client-sample
See Default Installation
Directories for the default location of studio-workspace
on your system.