< Previous | Next >

Defining the inputs and output for the custom visual snippet

After you have finished creating the custom visual snippet, you need to define its inputs and output.

An input defines the data that enters a snippet. This data can be defined as a Java™ type, a data type, or a business object. A custom visual snippet can have multiple inputs. An output, by comparison, defines the result of a snippet. Much like an input, the data can be defined as a Java type, a data type, or a business object. However, a custom visual snippet can only have one output.

To define the inputs and output for the custom visual snippet:

  1. If the IsListEmpty custom visual snippet is not already open in the visual snippet editor, complete the following steps:
    1. Click the Visual Snippets tab to open the Visual Snippets view.
    2. Expand the logic folder and select the IsListEmpty custom visual snippet, as shown in the following figure:
      Picture of the Visual Snippets view
    3. Right-click the IsListEmpty custom visual snippet and select Open. The IsListEmpty custom visual snippet opens in the visual snippet editor, as shown in the following figure:
      Picture of the visual snippet editor
  2. Define the input for the IsListEmpty custom visual snippet:
    1. In the Inputs row of the tray, click the Add Input icon Picture of the Add Input icon. A new default input is displayed beneath the Inputs row.
    2. At the bottom of the visual snippet editor, click the Properties tab. The Properties view opens.
    3. In the Name field, change the input name to list.
    4. Under the Type field, click Browse Java Types. The Select Type window opens.
    5. In the Choose a type field, type java.util.List.
    6. In the Matching types list, select List.
    7. In the Qualifier list, select java.util - installDir/runtimes/bi_v6/java/jre/lib/core.jar (where installDir is the install path of WebSphere Integration Developer).
    8. Click OK. The type java.util.List now appears in the Type field.
  3. Define the output for the IsListEmpty custom visual snippet:
    1. In the Output row of the tray, click the Add Output icon Picture of the Add Output icon. A new default output named Result is displayed beneath the Output row.
    2. At the bottom of the visual snippet editor, click the Properties tab. The Properties view opens.
    3. In the Name field, accept the default output name of Result.
    4. Under the Type field, click Browse Business Objects. The Data Type Selection window opens.
    5. Select the Show all XSD types check box.
    6. In the Filter by type, namespace, or file (? = any character, * = any String) field, delete the asterisk character (*) and type boolean.
    7. Click OK.
The input and output are now defined for the IsListEmpty custom visual snippet.

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.
< Previous | Next >