Artifact Management Server Adapter Sample

Disclaimer

Artifact Management Server (AMS) is removed in Spotfire® Streaming 11.1.x.

Introduction

This topic describes how to run the sample application for the Spotfire Streaming 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 Spotfire® Artifact Management Server, which is a separately installed product from Studio.

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

  • Select Artifact Management Server (AMS) adapter from the StreamBase Standard Adapters category.

  • Click Import Now.

StreamBase Studio creates a single project for the AMS adapter sample in your current Studio workspace.

Running the AMS Sample in StreamBase Studio

To run this sample in Studio:

  1. 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 Maven>Update Project from the context menu.

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

  3. 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.

  4. In the Manual Input view, select the Login input stream.

  5. Click Send Data.

  6. Observe the result emitted on the AMSOut output stream.

  7. In the Manual Input view, select the ListProjects input stream.

  8. Click Send Data.

  9. Observe the result emitted on the AMSOut output stream.

  10. In the Manual Input view, select the ListProjectArtifacts input stream.

  11. Enter values in the projectName field. For example, sample.

  12. Click Send Data.

  13. Observe the result emitted on the AMSOut output stream. For example, if you literally typed sample, observe a success=true message which simulates a successful search for an artifact project of that name. Other entered values may return success=true or success=false message depending on the entry.

  14. In the Manual Input view, select the Logout input stream.

  15. Click Send Data.

  16. Observe the result emitted on the AMSOut output stream.

  17. When done, press F9 or click the Stop Running Application button.

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_adapter_embedded_ams-client-sample

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