Creating document types from scratch

Create a document type from scratch to define the structure by adding fields that specify its contents and layout.

About this task

When predefined document types do not meet your specific data structure needs, you can create a document type from scratch. This approach gives you full control over the structure and content of the document type.

Procedure

  1. Go to Projects > Configurations > Flow service > Document Types.
  2. Select the option None build from scratch and click OK.
    The Add new document type page appears.
  3. Provide a name and description of your document type.
    Required fields are marked with an asterisk on the page.
  4. Click the Add new field icon and update the field properties.
    • Name. Name of the document type.
    • Type. Type of the field to define the structure and content of the document type.

      The type can be a String, Document, Document Reference, Object, Boolean, Double, Float, Integer, Long, or Short. If you select the Type as Document Reference, select a Document Reference. Types are used to declare the expected content and structure of the signatures, document contents, and pipeline contents.

    • XML namespace. Set an XML namespace for the field.

      Enter the namespace URI in the XML namespace property. Use the format prefix:fieldName for the field name. If the field name is eg:account and the XML namespace is set to http://www.example.com. The prefix is eg. The local name is account, and the namespace URI is http://www.example.com..

      Keep these points in mind for XML namespaces and prefixes in a field:

      The field name must be in the format prefix:fieldName.

      Specify a URI in the XML namespace property.

      Do not use the same prefix for different namespaces in the same document type, input signature, or output signature.

      Click Save after you have entered the details and constraints for each field. The new document type appears in the Document types page.

    • Content Type. Select the content type that you can apply to String, String list, or String table variables.

      See Content Types and Variable Constraints for more information.

    • Display Type. Use the Display type field to configure how input is captured for the field. The available options are,

      Text Field. Select this option to allow input in a standard single-line text field.

      Password. Select this option to mask the input with asterisks for secure password entry.

    • Pick List. Define the values in this field to specify the choices that appear when webMethods Integration prompts for input at run time.
    • Required Field. Indicates whether this data type must be provided when used. Select Yes to make it required, or No to make it optional.
    • Allow Null Values. Determines whether a field can accept null values. Choose one of the following options:

      Yes. When you want the field to accept null values, allowing optional data to be present without a value.

      No - When the field is mandatory and cannot accept null values, make sure that the field always has a value.

    • Load XML. Click Load XML to create a document type from an XML structure.
    • Load JSON. Click Load JSON to create one from a JSON structure.
  5. Click Save.
    Note: When you edit a document type, any change is automatically propagated to all flow services that use or reference the document type.