Creating a Flex Operator in the Visual Editor

Create a Flex operator to add an event handler written in SPLASH to the project.

  1. In the Visual editor Palette, in Streams and Windows , select Flex (flex.gif).
  2. Click anywhere in the diagram to place the Flex operator.
  3. To set the name of the Flex operator, either:
    • Click and press F2 to edit the operator name, or,
    • In verbose mode, click the edit flex.gif icon next to the name.
  4. Connect the Flex shape to the appropriate input streams or windows.
    Note: When you connect a stream or window to a Flex operator, by default the source is added as an input to the Flex shape, and an On Input method is created from the source stream or window.
  5. Click Add Columns column.gif to define the schema of the events produced by the Flex operator, or set the schema to a named schema in the Properties View.
  6. For each input to the Flex operator, the visual editor automatically adds a null input method. To add input methods without first connecting the Flex shape to an input, use the Add On Input Method in the shape toolbar.
    Each method is a SPLASH script that is invoked when an event arrives on the associated input. In other words, these are event handlers.
    1. To edit the SPLASH script for each method, make sure the Flex shape is selected, and press F4 to switch to the CCL editor.
      The CCL editor opens with the cursor at the CREATE FLEX statement.
    2. Edit the SPLASH script.
    3. Press F4 to switch back to the Visual editor.
  7. (Optional) Add an aging policy.
  8. (Optional) Click Set Output Keep Policy retention_window.gif and set keep policy options.
Related concepts
Specifying a Retention Policy
Related tasks
Setting an Aging Policy