How to use the Studio Manual Input view to send data into LiveView

How to use the Studio Manual Input view to send data into LiveView

book

Article ID: KB0075777

calendar_today

Updated On:

Products Versions
TIBCO Streaming -

Description

When running a StreamBase fragment, the Test/Debug perspective is available to interact with the fragment using the Manual Input view. When running a LiveView project as a fragment from Studio, the Test/Debug perspective does not open and connect.

How can I use the Studio Test/Debug perspective and Manual Input view to interact with a StreamBase application running within a LiveView server?

Issue/Introduction

Configuring remote attachment from Studio to StreamBase streams in a running LiveView server

Resolution

Start LiveView from Studio normally and then do a "remote attach" from Studio to the StreamBase application running in the LiveView server. StreamBase applications within a LiveView server run in their own container, named the same as the top-level EventFlow module configured to run.

Prerequisites:
  • All StreamBase applications which are to run in the LiveView server must be started as a data-source for a LV Table, or have an application .lvconf file which starts them within the server.
  • All StreamBase streams which the Manual Input view is to interact with must be marked "Always expose Stream for Enqueue", otherwise they will not be exposed for remote connection. See documentation reference: TIBCO Streaming > Authoring Guide > Using Streams > Defining Input Streams, "Properties: General Tab"
Set up Studio to connect to LiveView:
  1.   Open from the Run menu, Run Configurations.
  2.   Create a new "Attach to EventFlow Fragment" configuration item.
  3.   Give it a name and click the Browse button.
  4.   Select the .sbapp module used as the top-level application module that has the streams to connect to.
  5.   If the StreamBase port is configured differently than the default (port 10000) then change the URL to include the port (for example: sb://localhost:10010 ). The port must be a specific port and not a randomly chosen port (port zero, "0", is a random port when defined in the ClientAPIListener (com.tibco.ep.streambase.configuration.sbclientapilistener) HOCON configuration and is incompatible with this setup).
  6.   Click Apply to save and then Close the dialog.
Example:
Animation to create a remote attach run configuration

Run and Attach:
  1.   Start the LiveView server and wait for it to report "INFO  { Server Started }"
  2.   In Studio, from the Run toolbar-button or Run menu, select the name of the Run Configuration defined above to connect from Studio's Test/Debug perspective to the LiveView server.
  3.   In the Test/Debug perspective Manual Input view, select the SB container input stream.
  4.   Submit a tuple to the stream.
Note that as of TIBCO Streaming 10.5, detaching will terminate the remote server process. We recommend stopping the LiveView Server from the Studio toolbar before stopping the StreamBase Attach run, since this allows LiveView to exit more cleanly than if Studio terminates the SB container within the LiveView server.

Additional Information

Documentation Reference: TIBCO Streaming > Test/Debug Guide > Attaching to Running StreamBase Applications > Attaching to a Running Application