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
Adding terminals to the node
Procedure
- If the Terminals page is not already displayed, click the Terminals tab at the bottom of the Message Node editor.
- 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.
- 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.
- 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
- 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.
- 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.
- 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 .
- To add a simple property, click the name of a property
group in the hierarchy to highlight it, and click Add Simple
Property
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.
- 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.
- Enter any default values, which are shown in the Properties view when the node is included in a message flow.
- 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.
- 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.
- 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
- To add a table property, select the name of a
property group in the Properties view and click Add
Table Property .
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.
- To add a column to an existing table, select
the name of the table property in the hierarchy, and click Add
Simple Property. For example, the following figure shows the Property Hierarchy of the usernode, where Filter and Route columns have been added.
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.
- Select the correct attribute type in the Type field: one of the built-in types, or enumeration.
- 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.
- 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.
- 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.
- 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.
- Optional: Drag the properties in the properties hierarchy to change the order in which they are listed on the properties page.
- Close the nodename.msgnode file.
- 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.