Defining the node properties

Define the properties for a user-defined node created in Java™ or C only, and add input and output terminals so that you can connect it to other nodes in a message flow.

Before you begin

About this task

When you complete the task described in Creating the user-defined node plug-in files, a .msgnode file is created for the new node, and is opened in the Message Node editor of the Integration Development perspective. You can now add terminals and properties to the node.

Adding terminals to the node

Procedure

  1. If the Terminals page is not already displayed, click the Terminals tab at the bottom of the Message Node editor.
  2. Click Add to the right of the In Terminals or Out Terminals fields to add an input or output terminal.

    You must define at least one input terminal, but output terminals are optional.

  3. To rename a terminal, click the terminal name so that it is highlighted and shows a flashing cursor after the name, and enter a new name.
  4. If your node supports dynamic input or output terminals, select the appropriate check box.

    Dynamic terminals are terminals that you can add to certain nodes after you have added them to a message flow in the Message Flow editor. For more information, see Message flow node terminals.

Defining properties for the node

Procedure

  1. Click the Properties tab at the bottom of the Message Node editor.

    On the Properties page, you can set the properties for the node, for example, a database name, a host server name, or a password. The properties that you set here must match the properties that you specified in the user-defined node itself by using the get and set methods.

  2. If the node is an input node, click the node name in the hierarchy to highlight it, and select Input node. Select Use integration node default values if you want the node to initialize with the default values for the integration node.
  3. By default, all properties are grouped under the Basic group. You can add new groups in which to place properties. When your custom node is selected in the IBM® Integration Toolkit, each group of properties is rendered as a separate tab in the Properties view. To create additional groups of properties, click Add Property Group The image shows the Add Property Group icon..
  4. To add a simple property, click the name of a property group in the hierarchy to highlight it, and click Add Simple PropertyThe image shows the Add Simple Property icon.

    The new property is added to the hierarchy as a child of the property group. Its name is highlighted so that you can change it. A number of fields are displayed in the Details section, where you can configure the property.

    1. Select the correct attribute type: one of the built-in types, or a type to match the list of values that the property can have.
    2. Enter any default values, which are shown in the Properties view when the node is included in a message flow.
    3. Optional: If you want to use a custom property compiler, in the Custom Compiler Class field, click Import and select the class you want to use for your custom compiler. The class must implement the IRuntimePropertyCompiler interface. For more information, see Adding a property editor or compiler.
    4. Optional: If you want to use a custom property editor, in the Custom Editor Class field, click Import and select the class you want to use for your custom editor. The class must implement the IPropertyEditor interface. For more information, see Adding a property editor or compiler.
    5. Specify the system property for each attribute that you define:
      Hidden
      The property is not displayed in the Properties view or the Promote Property dialog box.
      Read only
      The property is displayed, but cannot be changed.
      Mandatory
      A value is required. The field cannot be left blank. Boolean and enum properties are always mandatory.
      Configurable
      The property can be configured at deployment time
  5. To add a table property, select the name of a property group in the Properties view and click Add Table Property Add Table Property icon shows two tables, one on top of the other with the top table being offset. A green cross is superimposed in the lower-left corner of the tables.

    In addition to simple properties, a node can also have complex properties. A table property represents a repeating property of a complex type. The new property is added to the hierarchy as a child of the property group. A number of fields are displayed in the Details section where you can configure the table property.

  6. To add a column to an existing table, select the name of the table property in the hierarchy, and click Add Simple PropertyAdd Simple Property icon is a table made up of two columns. A green cross is superimposed in the lower-left corner of the table.
    For example, the following figure shows the Property Hierarchy of the usernode, where Filter and Route columns have been added.
    This image shows the Details section of the Properties Hierarchy screen.

    A number of fields are displayed in the Details section where you can configure the properties of the column. Define table columns, where each column is assigned to a type.

    1. Select the correct attribute type in the Type field: one of the built-in types, or enumeration.
    2. Enter the default value, in the Default Value field. This value is shown in the Properties view when the node is included in a message flow.
    3. Specify a qualified class name in the Custom Compiler Class field for a property compiler. To create a custom compiler, use the IRuntimePropertyCompiler interface.
      For more information about custom property editors and property compilers, see Adding a property editor or compiler.
    4. Specify a qualified class name in the Custom Editor Class field to generate a custom property editor. The property editor specified in this field implements the IColumnPropertyEditor interface responsible for cell editing behavior. Leaving the Custom Editor Class field blank means that a property editor matching-column type is used. Specify your own IColumnPropertyEditor only if you need custom cell editing behavior.
    5. Specify the following attributes for each column that you define:
      Hidden
      Use a hidden column when you want to store, for each row, metadata that is not being displayed.
      Read only
      The column is displayed, but cannot be changed.
      Mandatory
      A value is required. The field cannot be left blank. Boolean and enum properties are always mandatory.

      Leave the Custom Editor Class field of the Details section of a table property blank, unless you want to overwrite the behavior of the entire table. For example, if the table becomes disabled in response to a change in another property editor.

      The following figure shows how the Table properties are rendered as a table in the Properties view, where you can add, edit, and delete values, and change the order of the values in the table.

      The diagram shows that the usernode properties are shown as a table.
  7. Optional: Drag the properties in the properties hierarchy to change the order in which they are listed on the properties page.
  8. Close the nodename.msgnode file.
  9. Optional: You can customize the text that is displayed in the node properties view for each property.
    To set the text, open the nodename.properties file and edit the line:
    Property.propertyName = your descriptive text

What to do next

The following tasks are optional:

You can now test your node, see Testing a user-defined node.