When to use the Send Tuple alert action

When to use the Send Tuple alert action

book

Article ID: KB0081201

calendar_today

Updated On:

Products Versions
TIBCO Live Datamart -

Description

What can the Send Tuple alert action for a LiveView alert be used to do?

Issue/Introduction

LiveView application design considerations

Resolution

A TIBCO Live Datamart server runs on a TIBCO StreamBase server which may have StreamBase applications publishing to the tables. These SB applications may have exposed input streams to accommodate state changes. The "Send Tuple" action is used to input to a stream to effect a change. The change may be anything the author of the publisher enables.

The form fields in the Action editor for the Send Tuple action are (example values)...
  •   StreamBase URI - sb://localhost:10000/ItemsSalesDataSource
  •   Input Stream - DataControl
These define how to connect to a running SB application's input stream. The remaining optional fields available under "Add Field Mapping" are obtained from the schema of the running SB application's input stream. Note that the URI need not be the same StreamBase server instance that is hosting the instance of Live Datamart which raised the alert.

For example, when running the LiveView Web sample application, the fields available for the ItemsSalesDataSource DataControl input stream are "command" and "value", which control a Feed Simulation adapter, so could take values "command: scale", "value=10" to run the simulation 10 times as fast as normal.

Each Send Tuple action field added can take a static value or map to the current value of a column of the event which triggered the action (formatting is accessed from the [+] control to the right of each field).

Note that although the Send Tuple action could be used to add or update a row in a LiveView Table, for this purpose please instead use the "Publish to Table" alert action that takes a LV URI and table name.

Alternatively you could add an input stream to an SB publisher for this purpose and allow the publisher application to do the work.