Publishing to Event Stream Processor

Add user control objects to a dashboard project so you can actively interact with Event Stream Processor streams.

The RTView adapter supports publishing data to the Event Stream Processor from a dashboard. The dashboard sends an event through the RTView adapter to an input stream on the Server.

  1. Add one or more control objects to the dashboard.
    Add a control for each field you want to set. You can use input boxes, picklists, listboxes, checkboxes, and buttons.
    1. Use the Tools menu in the Display Builder to create a variable for each field.
    2. Attach each control to a variable.
    3. Add variables by selecting Tools > Variables and specifying the name, initial value, and type of the variable.
    4. (Optional) Select Tools > Functions and create a function to determine the user choices in the control and attach the control to that function.
    5. (Optional) Link the property of other objects on the dashboard to the control.
  2. Associate an action command with the Control Object by right-clicking actionCommand under the Interaction category, and selecting Define Command > ESP. Enter a publish command:
    conn_name.publish ## opcode ## stream_name ## col_value_1 ## col_value_2 ...
    Parameter Description
    ## The argument delimiter, which you can set to anything. Default value is ##.

    Select Tools > Options, select ESP on the left pane, then click Add button. The delimiter must have a space before and after it.

    conn_name A predefined connection to be used for publishing.
    opcode The operation to perform. Valid values are:
    • 1 –– INSERT
    • 3 –– UPDATE
    • 5 –– DELETE
    • 7 –– UPSERT
    • 13 –– SAFE DELETE
    stream_name The name of the target stream.
    col_value_...

    The value of a column. The number of column values must equal the number of columns in the target stream. You can specify NULL values by entering two single quotation marks with nothing between them (for example, '') . Default value is ''.

    The RTView Viewer publishes empty fields as two single quotes (''). Because the default nullValue property is also '', a NULL is inserted into Event Stream Processor for corresponding columns.

    To specify an empty string, change the Null Value property in the Add ESP Connection window to a different value. For datatypes other than string, two single quotation marks without a space between them (for example, '') always represents a NULL value.

    • Specify date and timestamp values in the same format as in the Date and Timestamp format properties in the Add ESP Connection window. This is the same format specification the Java SimpleDateFormat object uses.
    • If the publish command is successful, there is no response. If the command does not succeed, you see an appropriate error message.