Adding a Container to a Message Definition

A message definition is defined by its fields and containers. A field models a data element, for example, a postal code. A container can contain fields and other containers.

To add a container to a message definition:

  1. In the WorkSpace Navigator of the Service Development perspective, expand the project that contains the message definition you want to work with.

  2. Expand MessageDesigns, then expand MessageDefinitions.

  3. Double-click the message definition. The message definition has a .wfm extension.

    The message definition opens in the Message Definition Editor.

  4. Select the Message Details tab.

  5. Do one of the following:

    • To add a container to the message definition at the root level, right-click the root, or top, element in the Message Definition section and select New Child|Container from the context menu.

    • To add a container inside another container, right-click the container in the Message Definition section and select New Child|Container from the context menu.

    • To insert a container directly before a container or field, at the same level in the tree, right-click the container or field in the Message Definition section and select Insert|Container from the context menu.

    The container is added to the tree. The Container Properties section displays default container properties.

  6. (Optional) To move the container, drag and drop the container to the correct location in the tree.

    When you drag the container, a horizontal line appears, indicating the new location.

  7. (Optional) In the Container Properties section, edit the settings using the following table.

    Note

    In each container, the Repeat Type, Node Type, and Termination Type properties have subproperties, which are described in Subproperties column.

    Container properties

    Container propertyOptionsSubproperties

    Name

    Enter a unique, descriptive name, for example, ShiptoAddress.

    For more information, see Troubleshooting Message Definition Objects.

    Optional

    Select if this container must occur in each message:

    True

    This container can be present or absent from a message.

    False

    Each message has at least one of these containers.

    Repeat Type

    Select the rule that determines how many containers of this type are expected to occur in each message:

    None

    This container always occurs once and only once.

    Unbounded

    This container can occur any number of times or not at all.

    Fixed Count

    This container occurs X number of times in each message, where X = Instances.

    Field Driven

    This container appears X number of times, where X = the non-negative integer value of the field specified by Instance Count Field.

    Range

    This container may appear any number of times between and including X and Y, where X is the positive non-zero integer value of Min and Y is the positive non-zero integer value of Max.

    Min

    Enter the fewest allowable instances of this container, for example, 1.

    Max

    Enter the fewest allowable instances of this container, for example, 5.

    Node Type

    Select whether the node consists of data, a literal tag, or both, and if the data conforms to a specified length:

    Container

    In the wire format, the container is not identified by a tag.

    TaggedContainer

    The container is identified by a literal tag, for example, ZIP:.

    Tag Value

    Click . . . to define the tag that identifies this container.

    Group Type

    Select the option that describes how this container's fields are arranged:

    Ordered

    This container contains a set of fields that occur in the same order for every message. When you add fields to this container, the field order must match the actual field order in a message.

    Alternative

    This container contains two or more fields, but only one of the fields is expected to occur per message. Use this type of container group type to model a field that can be one of several types in any given message.

    Termination Type

    Define how the end of the container is identified:

    None

    The end of the container is not marked.

    End of Container

    The container accepts input until the beginning of the next field or container or until the end of the message.

    Delimiter

    The end of the container is marked by a literal character string or binary sequence.

    For example, a semicolon ;

    Delimiter Value

    Click . . . to set up a delimiter to identify the end of the container.

    Fixed Length

    For all messages, the container length is defined by a consistent integer value.

    Length

    Enter the length of the container, for example, 255.

    Unit

    Select Character if Length is measured in characters or Byte if Length is measured in bytes.

    Minimum Length & Delimiter

    A minimum number of characters are read from the field, continuing until a delimiter is reached.

    Delimiter Value

    Click . . . to set up a delimiter to identify the end of the container.

    Length

    Enter the length of the container, for example, 255.

    Unit

    Select Character if Length denotes the number of characters or Byte if Length denotes the number of bytes.

    Minimum Length & White Space

    A minimum number of characters are read from the field, continuing until whitespace data is read, which may include spaces, carriage returns, line feeds, horizontal tabs, or vertical tabs.

    Length

    Enter the length of the container, for example, 255.

    Unit

    Select Character if Length is measured in characters or Byte if Length is measured in bytes.

    White Space

    The end of the container is marked by whitespace data, including spaces, carriage returns, line feeds, horizontal tabs, or vertical tabs.

  8. Select File|Save from the main menu bar to save the message definition.

Editing a Message Definition

Adding a Field to a Message Definition

Setting Message Definition Preferences

Custom Wire Formats

Supported Character Sets

Supported Datatypes

Supported Datatypes for HL7 Messages

Supported Date and Time Format Codes

Troubleshooting Message Definition Objects

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com