Creating New Objects

You can create new objects by using the Add option from the Edit menu.

When you populate the Contract Repository, we suggest that you construct your objects from the "bottom up." Create your elements first, then structs, operations, interfaces, and finally, modules. Elements are self-contained, but each of the other objects depend on the object prior to it in the Contract Repository tree (e.g., structs depend on elements).

Follow the instructions in the sections for:

Format Rules for Repository Objects

All object names that you input must conform to the format rules of C language identifiers. Each identifier must start with an alphabetic character or an underscore (e.g., fixed_occurrence). Each identifier can include alphabetic characters, underscores, and numeric characters.

Adding Modules

Figure 3-4 shows the Add Module window. To create a module, select the root of the module tree, choose Edit->Add from the menu bar to display the Add Module dialog box, and type the name in the Module Name text entry field. Select the module's current interfaces by moving items from the Available Interfaces display area to the Current Interfaces display area. See Creating New Objects for information about object naming conventions.

Figure 3-4 Add Module Window

Table 3-1 Add Module

Field Description

Module Name

Identifies the name of the module. You must enter the name of the module you wish to create. This field cannot be left blank or contain spaces. The name must not exceed 32 characters.

Current Interfaces

Lists the current interface names for the module. The display area is blank for all new modules. The Current Interfaces list can remain empty.

Available Interfaces

Lists available interface names for the module.

Arrow keys (<< or >>)

Moves selected item between Current Interfaces and Available Interfaces.

Last Updated

Displays the date and time of the most recent update and the name of the person who made the update. This area is empty until you create a module.

OK

Saves your addition.

Cancel

Returns to the previous window.

Help

Accesses online help.

Adding Modules Instructions

To add a module:

  1. Select the root of the Module tree in the main directory tree.

  2. Choose Edit ->Add from the menu bar

    Or

    Click on the Add toolbar button.

  3. The Add Modules window in Figure 3-4 displays.

  4. Complete the text entry fields and click OK to save the new module. Press Cancel to return to the previous window.

Adding Interfaces

You can create an interface by accessing the Add Interface window. The available operations are displayed on the right and the current operations are displayed on the left. Use the arrow buttons to move operations in or out of the interfaces. See Creating New Objects for information about object naming conventions.

Figure 3-5 Add Interface Window

Table 3-2 Add Interface

Field Description

Interface Name

Identifies the name of the interface. You must enter the name of the interface you wish to create. This field cannot be left blank or contain spaces. The name must not exceed 32 characters.

Current Operations

Lists the current operation names for the interface. The display area is blank for all new operations. The Current Operations list can remain empty.

Available Operations

Lists available operation names for the interface.

Arrow keys (<< or >>)

Moves selected item between Current Operations and Available Operations.

Last Updated

Displays the date and time of the most recent update and the name of the person who made the update. This area is empty until the interface is created.

OK

Saves your addition.

Cancel

Returns to the previous window.

Help

Accesses online help.

Adding Interface Instructions

To add an interface:

  1. Select the root of the interface tree.

  2. Choose Edit ->Add from the menu bar

    Or

    Click on the Add toolbar button.

  3. The Add Interface window in Figure 3-5 displays.

  4. Complete the text entry fields and click OK to save the new interface. Press Cancel to return to the previous window.

Adding Operations

To add operations, the list of available parameters (based on previously defined elements) is displayed on the right scrollable list. Type the operation name in the text entry field, select the parameters, and enter the BEA TUXEDO server implementation information. See Creating New Objects for information about object naming conventions.

When adding operations, the Select buttons for Input Buffer Name and Output Buffer Name are enabled if the buffer type is VIEW or VIEW 32. The Edit button is used to change a parameter's passing mode, occurrence, and mandatory attributes after it has been moved from the available list. See Modify Parameter for additional information. The default fields are shown below.

Field Default

Passing Mode

in

Mandatory

Yes

Display Name

Parameter name

Figure 3-6 Add Operation Window

Table 3-3 Add Operation

Field Description

Operation Name

Identifies the name of the operation. You must enter the name of the operation you wish to create. This field cannot be left blank or contain spaces. The name must not exceed 32 characters.

Current Parameters

Lists the current parameter names for the operation.

Note: If the Current Parameters list contains a parameter that is a struct type, it is not allowed to have another parameter that is a member of the struct type parameter. In addition, if the Current Parameters list contains a basic parameter, it is not allowed to have another struct type parameter that contains a member of the basic parameter.

Available Parameters

Lists available parameter names for the operation.

Arrow keys (<< or >>)

Moves selected item between Current Parameters and Available Parameters.

Edit

Enables editing of a selected current parameter. This option is disabled if you have not selected a current parameter.

When you select a "current parameter" and click Edit, you get the Edit Parameter window, which functions exactly the same as the Modify Parameter window.

For information about how to edit the parameter, see Modifying Parameters and Modify Parameter window.

TUXEDO Service Name

Identifies the BEA TUXEDO service that implements the operation. The TUXEDO Service Name must not be left blank and must obey the BEA TUXEDO service naming conventions.

Input Buffer Type and Output Buffer Type

VIEW - a C-structure and 16-bit integer field. Contains subtypes that have a particular structure.

VIEW32 - similar to VIEW, except 32-bit FML field identifiers are associated with VIEW32 structure elements.

CARRAY - an array of interpreted binary data that is neither encoded nor decoded during transmission; it may contain null characters. X_OCTET is equivalent.

FML - a type in which each field carries its own definition.

FML32 - similar to FML, except 32-bit field identifiers are associated with FML32.

STRING - a character array terminated by a null character that is encoded or decoded.

NONE - placeholder indicating that no input or output is required.

Only FML and FML32 buffer types allow for use of the input or in/out parameter. For all other buffer types (STRING, CARRAY, VIEW, VIEW32, and NONE), input and in/out parameters are not allowed.

Length

Length of the buffer type. You can only edit the buffer length when the buffer type is STRING or CARRAY.

Input View Name and Output View Name

The Select buttons next to the Input VIEW Name and Output VIEW Name fields are only enabled if you select VIEW or VIEW32 as the buffer types (in Input Buffer Type and Output Buffer Type fields). Click on the Select button to get the list of available VIEWs, which is a list of all elements that are of a struct type. (For information on selecting input and output view names, refer to Selecting Input and Output VIEW Names.)

The input and output VIEW names appear in the form ElementName (ElementType).

Exported

Exported operations are made available to the client. Select the checkbox to export the operation. If you do not select the checkbox, the operation remains unexported.

Return Exception

Enabled if exceptions are returned.

Last Updated

Displays the date and time of the most recent update and the name of the person who made the update. This area is empty until the operation is created.

OK

Saves addition.

Cancel

Returns to the previous window.

Help

Accesses online help.

Adding Operations Instructions

To add an operation:

  1. Select Operation in the main directory tree.

  2. Choose Edit -> Add from the menu bar

    Or

    Click on the Add toolbar button.

  3. The Add Operation window in Figure 3-6 displays.

  4. Complete the text entry fields and click OK to save the new operation. Press Cancel to return to the previous window.

Selecting Input and Output VIEW Names

If you select an input buffer type or an output buffer type of VIEW or VIEW32, the Select buttons for the Input VIEW Name and Output VIEW Name fields are enabled. When you click on Select, it brings up the Input VIEW Name or Output VIEW Name window shown in Figure 3-7.

To select a VIEW Name for an input or output buffer type:

  1. On the Add Operation or Modify Operation window, click Select next to the Input or Output VIEW Name.

    This brings up the Select Input VIEW Name or the Select Output VIEW Name window as shown in Figure 3-7.

    Figure 3-7 Select Input VIEW Name Window

    The input and output VIEW names appear in the form ElementName (ElementType).

  2. Select the Input or Output VIEW Name. This name displays in the Input or Output VIEW Name field above the selection list. If the selection list is empty or it does not have the name that you want, you will need to create a new structure-type element. See Adding Elements for more information about creating a new element.

  3. Click OK to close the window and save this choice. The Input or Output VIEW Name field updates to show your choice.

Adding Structs

Structs (also referred to as "structures") comprise a group of available element members. A struct cannot be nested within a struct. Each member has a name, type, and length information. Use the << or >> keys to move members between current and available status. When a member name is moved, all of the information accompanying the member is moved. See Creating New Objects for information about object naming conventions.

Figure 3-8 Add Struct Window

Table 3-4 Add Struct

Field Description

Struct Name

Identifies the name of the struct. You must enter the name of the struct you wish to create that is unique and does not exceed more than 31 characters.

Current Members

Lists the current member names for the struct. The display area is blank for all new structs.

Available Members

Lists available member names for the struct.

Arrow keys (<< or >>)

Moves selected item between Current Members and Available Members.

Last Updated

Displays the date and time of the most recent update and the name of the person who made the update. This area is empty until the struct is created.

OK

Saves your addition.

Cancel

Returns to the previous window.

Help

Accesses online help.

Adding Structs Instructions

To add a struct:

  1. Select Structs in the main directory tree.

  2. Choose Edit -> Add from the menu bar

    Or

    Click on the Add toolbar button.

  3. The Add Struct window in Figure 3-8 displays.

  4. Complete the text entry fields and click OK to save the new struct. Press Cancel to return to the previous window.

Adding Elements

You create new elements by using the Add Element window shown in Figure 3-9. See Creating New Objects for information about object naming conventions.

Figure 3-9 Add Element Window

Table 3-5 Add Element

Field Description

Element Name

Identifies the name of the new element. You must enter the name of the element you wish to create. This field cannot be left blank or contain spaces. The name must not exceed 32 characters.

Element Type

Indicates the element type; either a primary element type (char, string, short, long, float, double, carray) or a struct type. If an element is a member of a struct, you cannot select an element type that is a struct.

To select an element type, click on the Select button next to the Element Type field. (For more information, see Selecting an Element Type.)

Element Length

Enabled when an element type is string or carray. You cannot edit this field for other types.

Occurrence

The number of occurrences of this element. If 0, this indicates an unlimited number of occurrences for the element. If the element is an instance of a struct type, you must indicate "1" for the occurrence and it cannot be edited. The occurrence must not exceed 9 characters.

Fixed

If the element type is struct type, you must indicate its occurrence as "1," and it must be fixed (if you selected the checkbox).

For all other element types, if the occurrence is "0," it must not be fixed (if you did not select the checkbox). If the occurrence is "1," it must be fixed.

Comments

Allows entry of one line of comment text, without line breaks. You cannot include a colon (:) in the comments.

FML Field Name

Shows the BEA TUXEDO FML field name. To select the FML field name, click on the Select button next to the field. For more information, see Selecting an FML Field Name.

FML Field Number

Shows the FML field number for this FML field.

Last Updated

Displays the date and time of the most recent update and the name of the person who made the update. This area is empty until the element is created.

OK

Saves your addition.

Cancel

Returns to the previous window.

Help

Accesses online help.

Adding Elements Instructions

To add an element:

  1. Select Elements root in the main directory tree.

  2. Choose Edit -> Add from the menu bar

    Or

    Click on the Add toolbar button.

  3. The Add Element window displays.

  4. Complete the text entry fields and click OK to save the new element. Press Cancel to return to the previous window.

Selecting an Element Type

To select an element type from the Adding Elements window:

  1. On the Add Element or Modify Element window, click Select next to the Element Type field.

    This brings up the Select Element Type window as shown in Figure 3-10.

    Figure 3-10 Select Element Type Window

  2. Use the scroll bar to view the available element types.

  3. Select an element type and click OK to save your choice and return to the Add Element or Modify Element window. (Or click Cancel to close the window without saving your changes.)

Selecting an FML Field Name

If you are adding elements that use FML buffers, you may also want to add some new FML field names.

To add an FML field name:

  1. On the Add Element or Modify Element window, click Select next to the TUXEDO FML Field Name field.

    This brings up the Select FML Field window as shown in Figure 3-11.

    Figure 3-11 Select FML Field Window

  2. Select an FML field name or create a new one as described in the table below.

    Table 3-6 Select FML Field

    Field Description

    FML Field Name (scrollable list)

    Provides a list of existing FML field names. To choose one of these, simply select a name from the list and click OK.

    FML Field Name (input field)

    Displays the selected FML Field Name.

    To add a new FML field name (one not on the current list), click New. This causes both the FML Field Name and the FML Field Number fields to be editable so that you can type in a new name and choose an associated number.

    FML Field Number

    Specifies the FML field number for this FML field. You can either type in the number, or use the default. To accept the default, click on the Next button. (For information on how to set the default next FML field number, refer to Setting the Default Next FML Field Number.)

  3. Review the list of available FML Field Names. To use an existing name, select the field name from the list.

    Or

    To create a new FML Field name, click New and type the new name. To create a new FML Field Number for the new field name, type the number or use the default. To accept the default, click on the Next button. (For information on how to set the default next FML field number, refer to Setting the Default Next FML Field Number.)

  4. Click OK to save your changes. (Or click Cancel to close the window without saving your changes.)

Setting the Default Next FML Field Number

You can set a default number to be used for the next FML field that you create. The number you specify is used as a starting point. This number will automatically increment as you add elements with FML fields.

To set the default next FML field number:

  1. Choose Settings->FML from the menu bar.

    This brings up the FML Settings window.

    Figure 3-12 FML Settings Window

  2. Fill in the Next FML Field Number field with the number you want as the starting point for FML field numbers.

  3. Click OK to save your changes and close the window. (Or click Cancel to close the window without saving your changes.)

    The next time you create an element with an FML buffer, it will use your default number as the FML field number. Subsequent elements with FML buffers will have field numbers that increment from the default.